Difficulty: Easy
Correct Answer: 5
Explanation:
Introduction / Context:
Interrupts allow asynchronous events to preempt normal execution and run dedicated service routines. Knowing how many interrupt sources are available informs peripheral planning and priority assignment in embedded systems using the 8051.
Given Data / Assumptions:
Concept / Approach:
The classic 8051 supports five interrupt sources: External 0 (INT0), Timer 0 overflow (TF0), External 1 (INT1), Timer 1 overflow (TF1), and the serial port (RI or TI). Some derivatives add a sixth source for Timer 2, but that is not present in the original core.
Step-by-Step Solution:
Verification / Alternative check:
Consult a standard 8051 datasheet or vector table; exactly five vectors exist for the listed sources.
Why Other Options Are Wrong:
3 and 4: undercount by omitting legitimate sources.
6: applies to certain enhanced derivatives that include Timer 2, not the base 8051.
Common Pitfalls:
Assuming features of derivatives apply to all 8051 variants; conflating the serial port's receive and transmit flags with separate vectors when they share one vector.
Final Answer:
5
Discussion & Comments