šŸŽ“ BookMCQ
← Back to 10. Programmable Keyboard and Display Interface: 8279

šŸ“ 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.
2
Easy
4
Medium
2
Hard

šŸ“ 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?

A.Pin 11 for output and Pin 12 for ground āœ…
B.Pin 10 for output and Pin 12 for ground
C.Pin 13 for output and Pin 12 for ground
D.Pin 10 for output and Pin 21 for chip select
šŸ’” Difficulty: easy | āœ… Correct: A

šŸ“– 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?

A.Pin 20
B.Pin 22
C.Pin 23
D.Pin 21 āœ…
šŸ’” Difficulty: easy | āœ… Correct: D

šŸ“– 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?

A.Read counter 0 āœ…
B.Write mode word
C.Load counter 1
D.No operation
šŸ’” Difficulty: medium | āœ… Correct: A

šŸ“– 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?

A.Because low voltage consumes less power
B.To simplify wiring
C.Active‑low provides better noise immunity and ensures a defined default state
D.Historical convention only āœ…
šŸ’” Difficulty: medium | āœ… Correct: D

šŸ“– 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?

A.A1=0, A0=0
B.A1=1, A0=0 āœ…
C.A1=0, A0=1
D.A1=1, A0=1
šŸ’” Difficulty: medium | āœ… Correct: B

šŸ“– 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?

A.Read counter 2
B.Load counter 0
C.Read counter 1
D.Write Mode Word āœ…
šŸ’” Difficulty: hard | āœ… Correct: D

šŸ“– 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?

A.They may cause unpredictable operations, leading to erroneous counter loading or mode setting
B.They are safely ignored by the chip āœ…
C.They automatically default to a no‑operation state
D.They trigger an internal reset
šŸ’” Difficulty: hard | āœ… Correct: B

šŸ“– 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?

A.It forces the chip to read data from the data bus
B.It disables all counters
C.It tells the chip to accept a mode word or count value from the data bus āœ…
D.It has no effect unless RD is also low
šŸ’” Difficulty: medium | āœ… Correct: C

šŸ“– 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.

šŸ”— Related Topics (MCQs)