š End Interrupt/Error Mode Set of 8279 (8 MCQs)
End Interrupt and Special Error Mode Command
The End Interrupt/Error Mode Set command is an 8279 software command used for interrupt completion in sensor matrix operation and special error detection in N-key rollover mode. Its format is 111EXXXX, where the upper three bits identify the command and E determines the relevant control function. The remaining four bits are don't-care fields.
Interrupt Reset in Scanned Sensor Matrix Operation
In sensor matrix mode, a change in sensor status causes the 8279 to raise IRQ after the applicable scan. The processor reads the sensor information and issues the End Interrupt command when the scan event has been handled. This clears the interrupt condition and permits further sensor RAM updates.
Special Error Mode for N-Key Rollover
In N-key rollover operation, setting E to one enables special error mode. If two keys are detected during the same debounce interval, the controller identifies the simultaneous multiple-closure condition. The error indication appears in the FIFO status word, allowing software to recognize and handle the exceptional keyboard condition.
Example of Issuing the End Interrupt Command
Suppose a sensor matrix scan detects a changed sensor and IRQ becomes active. After reading the sensor data, the processor writes the End Interrupt command E0H to the command register. This acknowledges completion of the interrupt-related operation and allows the sensor scanning process to continue recording subsequent changes.
Relationship Between Error Handling and FIFO Status
The command links interrupt management with the status information maintained by the 8279. In sensor matrix mode it clears the relevant interrupt condition, while in N-key rollover it can enable multiple-closure error reporting. The processor uses the status register to determine whether an input or sensor event requires additional handling.
Misconceptions About End Interrupt and Error Mode
'The command is used only to disable hardware interrupts' is incorrect because it also controls special error mode. 'E equal to one always clears IRQ' overlooks its special-error meaning in N-key rollover. 'The command deletes all FIFO entries' is incorrect because FIFO clearing is handled by the separate Clear command.
Command Format and Interrupt-Error Examination Questions
Identify the 111E field format and explain the different applications in sensor matrix and N-key rollover modes. Understand the distinction between clearing an interrupt condition, enabling special error detection and clearing FIFO contents. Practise tracing IRQ, status information and command writing during sensor and keyboard operations.
Interrupt Completion and Error-Mode Terminology
- End Interrupt - Completes sensor interrupt handling.
- E Bit - Selects the special error function.
- IRQ - Indicates an interrupt request.
- Sensor Matrix - Stores external sensor states.
- Special Error Mode - Detects simultaneous key closures.
- FIFO Status - Reports input and error conditions.
š All End Interrupt/Error Mode Set of 8279 MCQs
Q1. A designer connects the output of counter 0 to an LED. Which pins must be used for the output and its ground reference?
š Explanation: Pin 10 is defined as OUTāÆ0, the output terminal for counterāÆ0, while pināÆ12 provides the ground reference for the chip. Connecting the LED to pināÆ10 allows the counterās output to drive the LED, and the common ground at pināÆ12 completes the circuit. OptionāÆA uses pināÆ11, which is the gate input, not an output; optionāÆC refers to counterāÆ1 pins; optionāÆD mixes an output pin with the chipāselect pin, which does not provide a ground reference. Therefore, optionāÆB correctly identifies the required pins.
Q2. Which pin on the 8253 chip serves as the activeālow Chip Select (CS) terminal?
š Explanation: PināÆ21 is designated as the CS (Chip Select) terminal on the 8253. This pin is active low, meaning the chip is enabled when the signal is driven to a logical ā0ā. The other listed pins serve different functions: pināÆ20 is not defined for CS, pināÆ22 is the RD (Read) line, and pināÆ23 is the WR (Write) line. Selecting the correct pin is essential for proper interfacing with a microprocessor, so the correct answer is pināÆ21.
Q3. If CS is low, RD is low, and WR is high, what operation does the 8253 perform?
š Explanation: When CS is low, the chip is enabled; a low RD signal tells the 8253 that the CPU is ready to receive data, and a high WR signal means no write is occurring. According to the controlāsignal table, this combination corresponds to a read operation on counterāÆ0. OptionsāÆB andāÆC describe writeārelated actions, and optionāÆD indicates no operation, which does not match the given signals. Hence, optionāÆA is correct.
Q4. Why are the control signals CS, RD, and WR designed as activeālow signals in the 8253?
š Explanation: Activeālow signals invert the logical sense, so a ā0ā represents the asserted condition. This convention improves noise immunity because a low voltage level is less susceptible to spurious highāfrequency noise on the bus. It also ensures that when the lines are left floating, they default to a high (inactive) state, preventing accidental activation. OptionsāÆA andāÆB describe unrelated benefits, while optionāÆD is merely historical. Therefore, optionāÆC correctly explains the design rationale.
Q5. To load counter 2 using the control signals, which address lines A1 and A0 must be set?
š Explanation: The address lines A1 and A0 are used to select which counter or control register is being accessed. TableāÆ9.1 shows that loading counterāÆ2 requires A1=1 and A0=0. Setting both lines to 0 selects counterāÆ0, while A1=0, A0=1 selects counterāÆ1, and A1=1, A0=1 selects the modeāword register. Thus, the correct combination is optionāÆB, matching the required selection for counterāÆ2.
Q6. During a write operation, the CPU drives CS low, WR low, and sets A1=1, A0=1 while keeping RD high. What does the 8253 interpret this combination as?
š Explanation: With CS low the chip is enabled, WR low indicates a write operation, and RD high means no read is requested. The address lines A1=1 and A0=1 select the control word register according to the table. Therefore the device interprets this pattern as a request to write a mode word into the control register. OptionsāÆA,āÆB, andāÆC describe read or load actions, which do not fit the signal combination. Hence, optionāÆD is the correct interpretation.
Q7. The table marks some controlāsignal combinations as āXā (undefined). What practical effect do these undefined states have on the 8253ās behavior?
š Explanation: The āXā entries denote states where the signal level is undefined, meaning the chip does not guarantee any specific behavior. If such a combination occurs, the 8253 may perform an unintended operation, such as loading a counter with incorrect data or changing the mode inadvertently, leading to system instability. Assuming the chip safely ignores these states (optionāÆB) or defaults to noāoperation (optionāÆC) is incorrect, as the hardware may react unpredictably. OptionāÆD is also false. Therefore, optionāÆA correctly describes the risk.
Q8. How does the presence of a low WR signal influence the 8253ās internal operation when CS is also low?
š Explanation: When CS is low, the chip is active. A low WR signal indicates that the CPU intends to write data onto the data bus. In this condition, the 8253 accepts either a mode word or a count value, depending on the address lines, and stores it in the appropriate register. OptionāÆA describes a read operation, which requires RD low. OptionāÆB suggests disabling counters, which is not the function of WR. OptionāÆD claims WR has no effect without RD low, which is inaccurate. Thus, optionāÆC is correct.