š 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.
š 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?
š 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?
š 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?
š 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?
š 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?
š 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?
š 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?
š 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.
š 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.