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

šŸ“ Read FIFO/Sensor RAM of 8279 (8 MCQs)

Purpose of the Read FIFO and Sensor RAM Command

The Read FIFO/Sensor RAM command selects the source of input information that the 8279 transfers to the processor during subsequent data-read operations. In scanned keyboard and strobed input modes, the source is the eight-character FIFO. In sensor matrix mode, the command selects a row from sensor RAM for reading.

Command Format and Address Selection Bits

The command format is 010AI X AAA. The upper three bits identify the read FIFO/Sensor RAM operation. AI enables automatic address incrementing for sensor RAM, while AAA selects one of its eight rows. In keyboard FIFO mode, the address and auto-increment fields are not relevant because entries are read in their arrival order.

Reading FIFO Entries and Sensor Matrix Rows

After the command is written with A0 high, the processor reads the selected information using A0 low and RD active low. Keyboard entries are returned in FIFO order, while sensor mode returns the selected sensor RAM row. When AI is enabled in sensor mode, subsequent reads advance to following rows.

Example of Reading a Keyboard FIFO Entry

Assume keyboard scanning has placed key code 25H into FIFO RAM. The processor sends command 40H to select FIFO reading, then performs an ordinary data read with A0 low. The returned byte is 25H, representing the stored key information and associated keyboard status.

Relationship Between FIFO Reading and Interrupt Handling

The FIFO and sensor RAM provide separate storage arrangements for different input modes. Keyboard and strobed input use FIFO buffering, while sensor matrix mode records row states. IRQ indicates pending information, and the processor reads the appropriate source before completing interrupt handling when required.

Misconceptions About FIFO and Sensor RAM Reading

'The Read FIFO command selects display RAM' is incorrect because display memory requires its own command. 'AAA selects a keyboard FIFO entry' is incorrect because keyboard entries are retrieved in arrival order. 'AI always advances a keyboard read address' overlooks the FIFO's automatic sequential reading behaviour.

Read Command Construction and Input-Data Questions

Understand the 010AI X AAA command format and distinguish keyboard FIFO from sensor RAM operation. Practise selecting sensor RAM rows and applying auto-increment. Questions may involve calculating command bytes, interpreting returned data and explaining how FIFO entries and sensor status are retrieved through separate operating modes.

FIFO and Sensor RAM Reading Terminology

  • FIFO - Stores keyboard or strobed input data.
  • Sensor RAM - Stores sensor matrix states.
  • AI - Enables automatic row incrementing.
  • AAA - Selects a sensor RAM row.
  • Read Command - Selects the data source.
  • IRQ - Indicates pending input information.
2
Easy
3
Medium
3
Hard

šŸ“ All Read FIFO/Sensor RAM of 8279 MCQs

Q1. A microcontroller wants to read the current count from counter 1 of an 8253 timer. Which combination of control pins must be driven low to correctly initiate the read operation?

A.CS low, RD low, WR high, A1=0, A0=1 āœ…
B.CS low, RD high, WR low, A1=0, A0=1
C.CS high, RD low, WR low, A1=0, A0=1
D.CS low, RD low, WR low, A1=0, A0=1
šŸ’” Difficulty: easy | āœ… Correct: A

šŸ“– Explanation: The read operation for counter 1 requires the chip‑select (CS) and read (RD) signals to be asserted low, while the write (WR) line must stay high to avoid a write. The address lines must select counter 1, so A1=0 and A0=1. Option A matches this exact configuration. Option B keeps RD high, preventing the device from placing data on the bus. Option C disables the chip with CS high, so no data is output. Option D asserts both RD and WR low, which the 8253 interprets as a no‑operation condition, not a read. Therefore A is correct.

Q2. When configuring the address bus to access the control word register of the 8253, which values should be placed on A1 and A0?

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

šŸ“– Explanation: The control word register is selected when both address lines are high, i.e., A1=1 and A0=1. This setting tells the 8253 that the incoming data will define the mode of operation rather than a counter value. Option D reflects this condition. Option A selects counter 0, Option B selects counter 1, and Option C selects counter 2. Selecting the wrong address line would cause the device to interpret the data incorrectly, leading to unexpected counting behavior. Hence D is the correct choice.

Q3. A designer inadvertently drives both RD and WR low while CS is also low. What is the resulting action of the 8253?

A.Load counter 0
B.Read counter 2
C.Write Mode Word
D.No operation (3‑state) āœ…
šŸ’” Difficulty: hard | āœ… Correct: D

šŸ“– Explanation: When CS, RD, and WR are all low, the 8253 receives an undefined combination that is listed as a no‑operation (3‑state) condition. The device does not load a counter, read a value, or write a mode word; it simply ignores the request. Options A, B, and C describe defined actions that require a specific pattern of high/low signals on RD and WR, which are not present here. Therefore the correct outcome is the no‑operation state, making D the right answer.

Q4. If the WR pin is mistakenly held low during a read cycle (RD also low) for counter 0, what effect does this have on the data transferred to the CPU?

A.The counter value is correctly read
B.The counter value is corrupted
C.No data is transferred āœ…
D.The mode word is written instead of the count
šŸ’” Difficulty: medium | āœ… Correct: C

šŸ“– Explanation: Both WR and RD being low violates the defined control‑signal matrix for the 8253. In this illegal state, the device does not perform a proper read; instead, it enters a no‑operation mode, meaning no data appears on the bus for the CPU. Option C captures this behavior. Option A assumes a normal read, which cannot happen when WR is low. Option B suggests corruption, which is not defined by the chip. Option D would require the address lines to select the mode word, which is not the case here. Hence C is correct.

Q5. Why are the CS, RD, and WR signals on the 8253 designed as active‑low inputs?

A.To simplify wiring by using pull‑up resistors āœ…
B.Because low voltage levels are faster to detect
C.To match the logic levels of most microprocessors
D.All of the above
šŸ’” Difficulty: medium | āœ… Correct: A

šŸ“– Explanation: The 8253 was built to interface with typical microprocessors that use active‑low control signals, meaning a low voltage indicates an active command. This convention simplifies timing and reduces noise susceptibility. While pull‑up resistors (Option A) are often used, the primary reason is compatibility with the prevailing logic families, making Option C the most accurate. Option B is not a primary design goal, and Option D overstates the case. Therefore, C correctly explains the design rationale.

Q6. How does the selection of A0 and A1 affect both the counters and the control word register in the 8253, and why is this multiplexing important for system designers?

A.It determines which counter receives data or which register is accessed, allowing three counters and one control word to share the same bus āœ…
B.It only selects the control word register; counters are accessed differently
C.It selects the power mode of the device
D.It has no effect on operation
šŸ’” Difficulty: hard | āœ… Correct: A

šŸ“– Explanation: The address lines A0 and A1 act as a 2‑bit selector that maps to four possible destinations: counter 0, counter 1, counter 2, and the control word register. By encoding these destinations, the 8253 can use a limited number of pins while still providing full access to all internal functions. This multiplexing reduces board space and wiring complexity, which is crucial in compact or cost‑sensitive designs. Options B, C, and D misunderstand the role of the address lines, making A the correct choice.

Q7. What is the pin number assigned to the ground terminal on the 8253 chip?

A.Pin 10
B.Pin 12 āœ…
C.Pin 21
D.Pin 24
šŸ’” Difficulty: easy | āœ… Correct: B

šŸ“– Explanation: The ground terminal for the 8253 is explicitly labeled as pin 12. This pin provides the reference voltage for the entire device and must be connected to the system ground for proper operation. Pin 10 is OUT 0, pin 21 is the chip‑select (CS) line, and pin 24 supplies +5 V. Confusing these pins would lead to malfunction, but the correct identification of the ground pin is pin 12.

Q8. Explain the role of the GATE input terminal for each counter in the 8253 and what happens to counting when the gate signal is held high versus low.

A.The gate enables counting when low; high disables counting āœ…
B.The gate disables counting when low; low enables counting
C.The gate has no effect on counting
D.The gate selects the counter to be reset
šŸ’” Difficulty: hard | āœ… Correct: A

šŸ“– Explanation: Each counter’s GATE pin controls whether the counter is allowed to increment on each clock pulse. When the gate signal is low (active), the counter passes clock pulses and counts normally. If the gate is held high (inactive), the counter ignores clock edges, effectively pausing the count. This behavior allows precise control of timing intervals. Options B, C, and D misinterpret the gate’s function: B reverses the logic, C claims no effect, and D confuses it with a reset line. Therefore, A accurately describes the gate’s purpose.

šŸ”— Related Topics (MCQs)