🎓 BookMCQ
← Back to 11. Programmable Interrupt Controller: 8259

📝 Fully Nested Mode (FNM) of 8259A (8 MCQs)

Default Priority Arrangement in Fully Nested Mode

Fully Nested Mode is the normal 8259A priority arrangement after initialization unless another mode is selected. The eight interrupt inputs are ranked from IR0 as the highest priority to IR7 as the lowest. This fixed order allows the priority resolver to select the most important eligible request and prevents a lower-priority request from interrupting a higher-priority service routine.

How the ISR Tracks Active and Nested Interrupt Levels

When the processor acknowledges a selected request, the corresponding bit in the In-Service Register is set and its pending request is removed from the IRR. While that service bit remains set, requests at the same or lower priority are inhibited. A higher-priority request can still be recognized, provided the processor's interrupt-enable state permits another interrupt.

Interrupt Preemption and Return to the Previous Service Level

When a higher-priority request interrupts a lower-priority routine, the processor saves its return position and begins the new service routine. After the higher-priority task finishes, its ISR bit must be cleared using EOI or AEOI. The processor then returns to the interrupted routine, while the lower-priority service level remains recorded until its own completion.

Example of IR2 Interrupting a Routine Serving IR5

Suppose IR5 is being serviced and IR2 becomes active. Since IR2 has higher priority, it can preempt IR5 when the 8085A has enabled nested maskable interrupts. The IR2 service routine executes first. Its EOI clears the IR2 in-service state, after which the processor can resume the unfinished IR5 routine.

End of Interrupt Commands and Service-Level Release

In normal fully nested operation, software usually issues a non-specific EOI before returning from a service routine. The controller clears the highest-priority ISR bit currently set, which corresponds to the most recently acknowledged nested level. Alternatively, AEOI performs automatic clearing at the final INTA pulse, but this is generally unsuitable when nested priority management is required.

Common Errors in Understanding Nested Priority

'IR7 has the highest default priority' is incorrect because IR0 is highest. 'A lower-priority request can preempt a higher one' is incorrect because normal nesting permits preemption only by a higher-priority request. 'Acknowledgement automatically clears the ISR bit in every configuration' is incorrect because normal operation requires EOI unless AEOI is enabled.

Priority Tracing and EOI Rules for Examination Problems

Memorize the sequence IR0, IR1, IR2 through IR7 from highest to lowest priority. Trace which request can preempt an active service level, and distinguish pending IRR bits from active ISR bits. For nested examples, determine which ISR bit a non-specific EOI clears and identify when the processor must re-enable interrupts to permit nesting.

Nested Service and Priority Terms

  • FNM - Default fixed-priority operating mode.
  • IR0 - Highest-priority default request.
  • ISR - Records active service levels.
  • Preemption - Higher-priority service interrupts lower-priority work.
  • EOI - Clears an in-service indication.
  • AEOI - Clears service state automatically.
2
Easy
4
Medium
2
Hard

📝 All Fully Nested Mode (FNM) of 8259A MCQs

Q1. A microcontroller must provide a clock signal to counter 1 of the 8253 timer. Which pin should be used for this purpose?

A.CLK0 (Pin 9)
B.CLK1 (Pin 15) ✅
C.GATE1 (Pin 14)
D.OUT1 (Pin 13)
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The clock input for counter 1 is pin 15, labelled CLK1, because each counter has its own dedicated clock line. Choosing CLK0 would drive counter 0, not counter 1, so the count would appear on the wrong channel. GATE1 merely enables or disables counting; it does not provide timing pulses. OUT1 is the output pin that reflects the counter’s state. Using the correct clock pin ensures the intended timing behavior in real hardware designs.

Q2. What logic level activates the Chip Select (CS) pin on the 8253 device?

A.Active low ✅
B.Active high
C.Tri‑state
D.Toggle
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The CS pin is designed to be active when it is at a low voltage level, meaning a logical 0 enables the chip. An active‑high interpretation would keep the device disabled when low, contradicting the datasheet specification. Tri‑state and toggle are not defined states for CS; they describe bus behavior, not activation. Recognizing the active‑low nature prevents inadvertent disabling of the timer in practical circuits.

Q3. If the address lines are set to A1=1 and A0=0, which operation does the 8253 perform?

A.Load counter 0
B.Load counter 1
C.Write Mode Word ✅
D.No operation
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: When A1=1 and A0=0, the control word register is selected, so the device expects a mode‑word write. Loading a counter would require A1=0 with the appropriate A0 value. Selecting no operation would involve both RD and WR high, which is unrelated to the address setting. Understanding this mapping lets designers program the timer correctly without mis‑addressing the registers.

Q4. To read the current count from counter 2, which combination of control signals must be asserted low?

A.CS low, RD low, WR high ✅
B.CS low, RD high, WR low
C.CS high, RD low, WR low
D.CS low, RD low, WR low
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Reading requires the chip to be selected (CS low) and the read line asserted (RD low) while the write line remains inactive (WR high). If RD is high, the device does not place data on the bus, and a low WR would trigger a write operation instead. Selecting CS high would disengage the chip entirely. Correctly setting these signals allows the CPU to retrieve the counter value reliably.

Q5. Why is pin 12 on the 8253 designated as the ground terminal?

A.It supplies power to the chip
B.It provides a reference voltage for all internal circuits
C.It acts as an additional output pin
D.It resets the counters when tied low ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Pin 12 is connected to the system ground, establishing a common reference point for all voltage levels inside the timer. Without this reference, the chip could not interpret logical high and low correctly, leading to unpredictable operation. Supplying power occurs on the +VCC pin, not ground. An output pin would require driver circuitry, and tying ground low does not reset counters; reset is performed via other pins.

Q6. A signal toggles every 10 µs on GATE2 while CLK2 receives a 1 MHz clock. How does this affect counter 2's counting behavior?

A.Counter 2 counts only while GATE2 is high
B.Counter 2 counts continuously regardless of GATE2
C.Counter 2 resets each time GATE2 toggles ✅
D.Counter 2 stops counting entirely
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: GATE2 acts as an enable line; when it is low, counting is disabled, and when high, counting proceeds on each clock edge. The 10 µs toggling creates periods where counting is paused, causing the counter to resume from its last value each time the gate goes high again. It does not reset the count on each toggle, nor does it allow uninterrupted counting, making the described behavior the correct interpretation.

Q7. How do the address lines A1 and A0 determine which counter or register is selected on the 8253?

A.00 selects counter 0, 01 selects counter 1, 10 selects counter 2, 11 selects the control word register
B.00 selects the control word register, 01 selects counter 0, 10 selects counter 1, 11 selects counter 2
C.00 selects counter 2, 01 selects counter 1, 10 selects counter 0, 11 selects the control word register
D.00 selects counter 1, 01 selects counter 2, 10 selects the control word register, 11 selects counter 0 ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: The binary combination of A1 and A0 maps directly to the three counters and the mode‑word register: 00 → counter 0, 01 → counter 1, 10 → counter 2, and 11 → control word register. Any other mapping would cause the CPU to address the wrong hardware block, leading to incorrect data writes or reads. Knowing this mapping is essential for correctly programming the timer in embedded systems.

Q8. When the WR line is driven low, what primary action does the 8253 perform?

A.It loads a mode word into the control register
B.It reads the current count of a selected counter ✅
C.It enables the chip for operation
D.It resets all counters to zero
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A low WR signal tells the device that the data on the bus represents a mode‑word to be stored, configuring the selected counter’s operating mode. Reading a count requires RD low, not WR low. Enabling the chip is handled by CS, and resetting counters involves specific gate or control signals, not WR. Recognizing the role of WR prevents confusion between programming and data‑retrieval operations.

🔗 Related Topics (MCQs)