250+ TOP MCQs on Timer Programming and Answers

AVR Micro-controller Multiple Choice Questions on “Timer Programming”.

1. In AVR, which of the following registers are not used for programming timers?
a) TCNT
b) TCON
c) TIFR
d) None of the mentioned

Answer: b
Clarification: In the timer programming of an AVR microcontroller, mainly used registers are TCNTn that stores the values of the count. TCCRn that is used to assign the mode of operation of a timer and TIFR that stores the status of various flags of the timers. Two more registers are used they are OCRn and OCFn. They are used for comparison with the count register.

2. What is the use of the prescalar in the operation of the timer?
a) for fast calculations
b) for increasing the time delay given by the timer by decreasing its frequency of operation
c) for removing the concept the reloading of count
d) for easy counter operations

Answer: b
Clarification: Prescalars are used in the operation of the timers because they generally increase the time delay generation by decreasing the frequency of its operation.

3. What modes are generally used in the operation of the timer0?
a) Normal mode
b) CTC mode
c) PWM mode
d) All of the mentioned

Answer: d
Clarification: Modes of a timer are decided by the WGM00 and WGM01 bit of the TCCR0 register and for timer0 these modes are normal mode, CTC mode, pwm mode and the fast pwm mode.

4. Timer 0 can act as a counter ____________
a) if the CS02-CS00 are 110 or 111
b) if the FOC0 bit is set to 110
c) none of the mentioned
d) all of the mentioned

  250+ TOP MCQs on Sensor Interfacing and Answers

Answer: a
Clarification: Timer0 can act as a counter if the CS02-CS00 bits are from 110-111.

5. Which of the timer can operate in the 16 bit condition?
a) timer0
b) timer1
c) timer2
d) all of the mentioned

Answer: b
Clarification: Timer0 and Timer2 can operate in the 8 bit condition while only Timer 1 operates in the 16 bit condition.

6. Which of the following will generate the maximum time delay?
a) f/2
b) f/4
c) f/16
d) f/32

Answer: d
Clarification: f/32 has the lowest frequency as it is divided by the maximum value of the constant, so as time and frequency are inversely related to each other so this will generate the maximum amount of machine cycle which will as a result generate the greatest delay.

7. What is the difference in the operation of a normal and a CTC mode of a timer?
a) in CTC mode PWM is used
b) here serial timer is monitored
c) in CTC mode, timer counts up until contents of TCNT register becomes equal to the contents of OCR
d) none of the mentioned

Answer: c
Clarification: In CTC mode, timer counts up until the contents of TCNT register becomes equal to the contents of OCR; then the timer will be cleared and the OCF0 flag will be set when the next clock occurs. In Normal mode, timer counts until max i.e. 0xFFH. When it rolls over from 0xFFH to 0x00H, it sets TOV(Timer Overflow).

8. We can count the pulses on the positive or the negative edge triggered pulse of the clock?
a) true
b) false
c) can’t be determined
d) depends on the circumstances

  250+ TOP MCQs on Low Power Modes and Answers

Answer: a
Clarification: A counter can count pulses on the positive or the negative edge of the clock.

9. Which pin is used for the input clock of the counter0?
a) PORTB.0
b) PORTB.1
c) PORTB.2
d) PORTB.3

Answer: a
Clarification: In ATmega32/16, T0 is the alternative function of PORTB.0. T0 is Timer/Counter 0 External Clock Input.

10. Which resource provides the clock pulse to AVR timers if CS02-00=6?
a) internal clock of the AVR
b) external clock of the AVR
c) none of the mentioned
d) all of the mentioned

Answer: b
Clarification: The External clock is used for providing the pulse to the AVR timers if CS02-00=6.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top