Programming Confined to Timer Modes - MCQs with Answers

Programming Confined to Timer Modes - MCQs with Answers


Q1. Consider the below generated program segment for initializing Timer 1 in Mode 1 operation :

MOV SP, # 54 H
MOV TMOD ,# 0010 0000 C
SET C ET1
SETC TR0
SJMP $

Which among the below mentioned program segments represent the correct code ?



a. MOV SP, # 54 H
MOV TCON ,# 0010 0000 C
SETC ET1
SETC TR0
SJMP $

b. MOV SP, # 54H
MOV TMOD ,# 0010 0000 C
SETC ET0
SETC TR0
SJMP $

c. MOV SP, # 54 H
MOV TMOD ,# 0010 0000 C
SETC ET1
SETC TR1
SETC EA
SJMP $

d. MOV SP, # 54 H
MOV TMOD ,# 0010 0000 C
SETC ET0
SETC TR1
SETC EA
SJMP $

View Answer / Hide Answer

ANSWER: MOV SP, # 54 H
MOV TMOD ,# 0010 0000 C
SETC ET1
SETC TR1
SETC EA
SJMP $



Q2. What is the maximum delay generated by the 12 MHz clock frequency in accordance to an auto-reload mode (Mode 2 ) operation of the timer?

a. 125 μ s
b. 250 μ s
c. 256 μ s
d. 1200 μ s

View Answer / Hide Answer

ANSWER: c. 256 μ s



Q3. Which among the below mentioned sequence of program instructions represent the correct chronological order for the generation of 2kHz square wave frequency?


1. MOV TMOD, 0000 0010 B
2. MOV TL0, # 06H
3. MOV TH0, # 06H
4. SETB TR0
5. CPL p1.0
6. ORG 0000H


a. 6, 5, 2, 4, 1, 3
b. 6, 1, 3, 2, 4, 5
c. 6, 5, 4, 3, 2, 1
d. 6, 2, 4, 5, 1, 3

View Answer / Hide Answer

ANSWER: b. 6, 1, 3,2, 4, 5


Post your comment