Interrupt Programming MCQ’s

Read Time:1 Minute, 41 Second

This set of Microcontroller Multiple Choice Questions & Answers (MCQs) focuses on “Interrupt Programming”.

1. TIMSK register is used for?
a) knowing the status of the timer count
b) used for masking the interrupts flags of the Timer0, Timer1 and Timer2
c) it is used for enabling all the timer interrupts
d) it is used for resetting the value of the interrupts

2. Why RETI instruction be the last instruction of ISR?
a) because it returns with carry
b) because it returns to the main program with all the flags of the SREG raised
c) because it returns to the main program where interrupt is generated and set the global interrupt enable bit in SREG
d) none of the mentioned

3. On reset, what are the contents of the SREG register?
a) 00h
b) ffh
c) 1fh
d) 11h

4. In AVR what is the ISR address for an external hardware interrupt?
a) 0002h
b) 0004h
c) 0006h
d) all of the mentioned

5. Is the same address is assigned for the timer0 and timer1 overflow flag in the interrupt vector table of the interrupts?
a) true
b) false
c) can’t be determined
d) depends on the situation

6. Which register is responsible for handling all the external hardware interrupts?
a) TIMSK
b) GICR
c) MCUCR
d) IVCE

7. What is the address in the interrupt service routine assigned for the timer0 overflow flag?
a) 0012h
b) 000Ah
c) 0016h
d) all of the mentioned

8. External hardware interrupts are assigned to which pins of the atmega32?
a) PORTD.2
b) PORTD.3
c) PORTB.2
d) All of the mentioned

9. By default, INT0-INT2 interrupts are?
a) edge triggered
b) level triggered
c) all of the mentioned
d) none of the mentioned

10. What will happen in that condition, if an interrupt occurs while the microcontroller is serving any other interrupt?
a) both the interrupts will be handled simultaneously
b) the interrupt which is being done first will be served first
c) the interrupt that is more priority in the interrupt vector table will be served first
d) the interrupt having low priority in the interrupt vector table will be served first

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

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

Previous post Timer Programming MCQ’s
Next post Serial Port Communication MCQ’s