Engineering Questions with Answers - Multiple Choice Questions
Home » MCQs » Computer Science » MCQs on Interrupt and Stack of 8051 -1
MCQs on Interrupt and Stack of 8051 -1
Which of the following is an external interrupt?
a) INT0(active low)
b) INT2(active low)
c) Timer0 interrupt
d) Timer1 interrupt
View Answer
Explanation: INT0(active low) and INT1(active low) are two external interrupt inputs provided by 8051.
The interrupts, INT0(active low) and INT1(active low) are processed internally by flags
a) IE0 and IE1
b) IE0 and IF1
c) IF0 and IE1
d) IF0 and IF1
View Answer
Explanation: The interrupts, INT0(active low) and INT1(active low) are processed internally by the flags IE0 and IE1.
The flags IE0 and IE1, are automatically cleared after the control is transferred to respective vector if the interrupt is
a) level-sensitive
b) edge-sensitive
c) in serial port
d) in parallel port
View Answer
Answer: b
Explanation: If the interrupts are programmed as edge sensitive, the flags IE0 and IE1 are automatically cleared after the control is transferred to respective vector.
If the external interrupt sources control the flags IE0 and IE1, then the interrupt programmed is
a) level-sensitive
b) edge-sensitive
c) in serial port
d) in parallel port
View Answer
Answer: a
Explanation: If the interrupts are programmed as level sensitive, then the flags IE0 and IE1 are controlled by external interrupt sources themselves.
The pulses at T0 or T1 pin are counted in
a) timer mode
b) counter mode
c) idle mode
d) power down mode
View Answer
Answer: b
Explanation: In counter mode, the pulses are counted at T0 or T1 pin.
In timer mode, the oscillator clock is divided by a prescalar
a) (1/8)
b) (1/4)
c) (1/16)
d) (1/32)
View Answer
Answer: d
Explanation: In timer mode, the oscillator clock is divided by a prescalar (1/32) and then given to the timer.
The serial port interrupt is generated if
a) RI is set
b) RI and TI are set
c) Either RI or TI is set
d) RI and TI are reset
View Answer
Answer: c
Explanation: The serial port interrupt is generated if atleast one of the two bits, RI and TI is set.
In serial port interrupt, after the control is transferred to the interrupt service routine, the flag that is cleared is
a) RI
b) TI
c) RI and TI
d) None
View Answer
Answer: d
Explanation: In serial port interrupt, after the control is transferred to the interrupt service routine, neither of the flags are cleared.
The atleast number of machine cycles for which the external interrupts that are programmed level-sensitive should remain high is
a) 1
b) 2
c) 3
d) 0
View Answer
Answer: b
Explanation: The external interrupts, programmed level-sensitive should remain high for atleast 2 machine cycles.
If the external interrupts are programmed edge sensitive, then they should remain high for atleast
a) 0 machine cycle
b) 2 machine cycles
c) 1 machine cycle
d) 3 machine cycles
View Answer
Answer: c
Explanation: If the external interrupts are programmed edge sensitive, then they should remain high for atleast one machine cycle and low for atleast one machine cycle, for being sensed.