Timer Programming MCQs
Timer Programming MCQs
Answer: b
Explanation: Timer’s clock source is the crystal that is applied to the controller.
2. What is the frequency of the clock that is being used as the clock source for the timer?
a) some externally applied frequency f’
b) controller’s crystal frequency f
c) controller’s crystal frequency /12
d) externally applied frequency/12
View Answer
Answer: c
Explanation: The frequency of the clock source for the timer is equal to f/12(where f is the frequency of
the crystal).
Answer: a
Explanation: TMOD register is used to set different timer’s or counter’s to their appropriate modes so
that it tells the user that what mode is being used when operating any timer or counter.
4. What is the maximum delay that can be generated with the crystal frequency of 22MHz?
a) 2978.9 sec
b) 0.011 msec
c) 11.63 sec
d) 2.97 msec
View Answer
Answer: d
Explanation: For generating the maximum delay we have to multiply the maximum number of counts
with the time period required to execute one machine cycle( 65536*1/22MHz).
5. Find out the roll over value for the timer in Mode 0, Mode 1 and Mode 2?
a) 00FFH,0FFFH,FFFFH
b) 1FFFH,0FFFH,FFFFH
c) 1FFFH,FFFFH,00FFH
d) 1FFFH,00FFH,FFFFH
View Answer
Answer: c
Explanation: For Mode 0 13 bit value is used so 1FFFH is chosen to be the roll over value. Similarly for
Mode 1 FFFFH and for Mode 2 FFH is the roll over value for the timers and counter.
6. If Timer 0 is to be used as a counter, then at what particular pin clock pulse need to be applied?
a) P3.3
b) P3.4
c) P3.5
d) P3.6
View Answer
Answer: b
Explanation: If Timer 0 is to be used as a counter, then a pulse has to be applied at P3.4 and if it is for
Timer 1 then the clock pulse has to be applied at the pin P3.5.
Answer: c
Explanation: These bits are of TCON register. It tells us about the overflow flag bit and the run control
bit.
Answer: d
Explanation: In 8051, a port is initialized by default in its output mode no need to pass any value to it.
2. Which out of the four ports of 8051 needs a pull-up resistor for using it is as an input or an output
port?
a) PORT 0
b) PORT 1
c) PORT 2
d) PORT 3
View Answer
Answer: a
Explanation: These pins are the open drain pins of the controller which means it needs a pull-up resistor
for using it as an input or an output ports.
3. Which of the ports act as the 16 bit address lines for transferring data through it?
a) PORT 0 and PORT 1
b) PORT 1 and PORT 2
c) PORT 0 and PORT 2
d) PORT 1 and PORT 3
View Answer
Answer: b
Explanation: PCON register is not a bit addressable register.
Q1. Which value of disc capacitors is preferred or recommended especially when the quartz crystal is
connected externally in an oscillator circuit of 8051 ?
a. 10 pF
b. 20 pF
c. 30 pF
d. 40 pF
ANSWER: c. 30 pF
Why are the resonators not preferred for an oscillator circuit 0f 8051?
Q3. Which location specify the storage / loading of vector address during the interrupt
generation?
a. Stack Pointer
b. Program Counter
c. Data Pointer
d. All of the above