🎓 BookMCQ
← Back to 10. Programmable Keyboard and Display Interface: 8279

📝 Status Register(IN Operation) of 8279 (11 MCQs)

Reading the Eight-Bit FIFO and Sensor Status Word

The 8279 status register provides information about keyboard FIFO conditions, sensor or special error status and display availability. The 8085 reads this word through an input operation with A0 high, CS active low and RD active low. Its eight bits allow software to identify pending entries, buffer errors and display-memory availability.

FIFO Count and Buffer-Condition Status Bits

Bits D2–D0 indicate the number of characters currently stored in the eight-entry FIFO, while D3 indicates FIFO full. D4 indicates FIFO underrun, which occurs when the processor attempts to read an empty FIFO. D5 indicates overrun when another entry is attempted while the FIFO is full.

Sensor Error and Display Unavailable Indicators

D6 represents sensor/error status, depending on the operating mode. In sensor matrix operation it indicates sensor data availability, while in special error mode it can report simultaneous multiple-key closures. D7 is the Display Unavailable indicator, which becomes active while a display-clear operation is still in progress.

Example of Interpreting a FIFO Status Value

Suppose a status word indicates D3 equal to zero and D2–D0 equal to 011. The FIFO is not full and contains three entries. The processor can therefore read the available keyboard bytes. If D5 is one, it must also recognize that an earlier FIFO overrun condition occurred.

Role of Status Reading in Reliable Keyboard Programming

Status checking allows software to avoid reading an empty FIFO, detect lost input caused by overrun and wait until display clearing has completed. It also supports sensor change processing and special keyboard error handling. Proper interpretation of the status word makes communication between the processor and 8279 more reliable.

Misconceptions About Status Register Bits

'D3 counts the number of FIFO characters' is incorrect because the count is provided by D2–D0. 'D5 indicates FIFO underrun' reverses the meanings of overrun and underrun, which are D5 and D4 respectively. 'D7 indicates FIFO full' confuses display availability with FIFO status.

Status-Word Interpretation and Error-Detection Questions

Memorize the functions of D7 through D0 and practise decoding binary status values. Determine FIFO occupancy, identify full, overrun and underrun conditions, and distinguish sensor/error information from display availability. Understand why the processor reads status using A0 high rather than the ordinary data-register access selection.

Status Register and FIFO Monitoring Terminology

  • Status Word - Reports internal device conditions.
  • D7 DU - Indicates display unavailability.
  • D5 O - Indicates FIFO overrun.
  • D4 U - Indicates FIFO underrun.
  • D3 F - Indicates FIFO full.
  • D2–D0 - Indicate the FIFO entry count.
3
Easy
4
Medium
4
Hard

📝 All Status Register(IN Operation) of 8279 MCQs

Q1. A microcontroller must read the current count from counter 0 of an 8253 timer. Which combination of control signals should be asserted?

A.CS=0, RD=1, WR=0, A1=0, A0=0 (Load counter 0)
B.CS=0, RD=0, WR=1, A1=0, A0=0 (Read counter 0) ✅
C.CS=0, RD=0, WR=1, A1=0, A0=1 (Read counter 1)
D.CS=0, RD=1, WR=0, A1=1, A0=0 (Load counter 2)
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The correct choice asserts CS low to enable the chip, pulls RD low to indicate a read, and sets WR high because we are not writing. A1 and A0 both at 0 select counter 0. This combination matches the “Read counter 0” row in the control‑signal table. Options A and C target loading or the wrong counter, while D selects counter 2, so they would not return the desired count.

Q2. What primary function does the CS (Chip Select) pin serve on the 8253 timer?

A.It is an active‑low enable that allows the device to respond to bus commands ✅
B.It generates the clock signal for all three counters
C.It provides a dedicated data output for the status register
D.It selects which counter receives the mode word
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The CS pin being active low means that when the signal is driven low, the 8253 becomes active and can accept read, write, or mode‑word commands. This is essential for proper bus arbitration. The other options describe unrelated functions: the clock is supplied on separate pins, data output comes from the OUT pins, and counter selection uses A0/A1, not CS.

Q3. To generate a 1 ms periodic interrupt using counter 2, which pin must be connected to the interrupt line and what control signals are required to load the counter with the appropriate divisor?

A.Connect OUT 2; assert CS low, WR low, RD high, A1=1, A0=0
B.Connect GATE 2; assert CS low, WR low, RD high, A1=1, A0=0
C.Connect CLK 2; assert CS low, WR low, RD high, A1=1, A0=0
D.Connect OUT 2; assert CS low, RD low, WR high, A1=1, A0=0 ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: The interrupt line should be driven by the OUT 2 pin because it toggles when the counter reaches zero, producing the needed pulse. Loading the divisor requires a write operation: CS low, WR low, RD high, and address bits A1=1, A0=0 to select counter 2. Option B incorrectly uses GATE 2, which only enables counting; C misidentifies the clock pin; D mixes up read/write signals.

Q4. How do the address lines A0 and A1 determine which counter or the control word register is accessed on the 8253?

A.A1 = 0, A0 = 0 selects counter 0; A1 = 0, A0 = 1 selects counter 1
B.A1 = 1, A0 = 0 selects counter 2; A1 = 1, A0 = 1 selects the mode‑word register
C.A1 = 0, A0 = 0 selects the mode‑word register; other combinations select counters ✅
D.A1 = 1, A0 = 1 selects counter 0; A1 = 0, A0 = 0 selects counter 2
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The 8253 uses the two address lines to multiplex access: both low (00) selects counter 0, 01 selects counter 1, 10 selects counter 2, and 11 selects the control word register. This mapping is fixed in the hardware and allows the CPU to address each resource without extra pins. Options A and B swap the meanings, while D reverses the mapping, leading to incorrect accesses.

Q5. Which pin number corresponds to the GATE input for counter 1?

A.14 ✅
B.13
C.15
D.16
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Pin 14 is designated as GATE 1, the gate input that enables or disables counting for counter 1. Knowing the pin layout is essential when wiring the timer into a system. Pin 13 is OUT 1, pin 15 is CLK 1, and pin 16 belongs to counter 2, so those alternatives are incorrect.

Q6. During a write operation to load counter 1, the following signals are present: CS = 0, WR = 0, RD = 1, A1 = 0, A0 = 1. What operation does the 8253 perform?

A.Read counter 0
B.Read counter 1
C.Load counter 1 ✅
D.Write mode word
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: With CS low, the device is enabled. WR low indicates a write cycle, while RD high means no read. The address bits 01 select counter 1, so the chip interprets the command as loading the count value into counter 1. Options A and B describe read operations, which would require RD low; D would need A1 = 1, A0 = 1 for the mode‑word register.

Q7. Why is the RD pin considered active‑low, and what effect does pulling it low have on the 8253 data bus?

A.It disables the device, causing the data bus to float
B.It enables the device to place the selected counter’s count on the data bus
C.It triggers a reset of the counters
D.It selects the mode‑word register for writing ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: When RD is driven low, the 8253 knows the CPU is ready to receive data, so it places the requested count on the data bus. Because the signal is active low, a low voltage level triggers this behavior, while a high level leaves the bus unchanged. Options A and C describe unrelated functions, and B misstates the direction of data flow.

Q8. A designer mistakenly ties pin 21 (CS) to VCC instead of pulling it low when accessing counter 0. What is the most likely result?

A.The 8253 will be permanently disabled, ignoring all commands ✅
B.Counter 0 will always read as zero
C.The mode‑word register will be overwritten with garbage data
D.No effect; the device will operate normally
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: CS is active low; tying it to VCC keeps the chip in a disabled state for normal operations. However, some internal pull‑ups may still allow a write, but reads will typically return zero because the device does not latch valid data. Option A would imply total inactivity, which is not true because a write can still occur; C and D are unrelated to the CS behavior.

Q9. Explain how the combination of CS, RD, WR, A1, and A0 can place the 8253 data lines in a three‑state condition.

A.When CS is high, the device disables its drivers regardless of other signals, creating a high‑impedance state ✅
B.When both RD and WR are low simultaneously, the chip enters a three‑state mode
C.When A1 and A0 are both undefined (X), the data lines float
D.When CS is low and either RD or WR is high, the data lines become three‑state
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The CS pin controls whether the 8253 participates on the bus. If CS is high (inactive), the chip disables its output drivers, placing its data lines in a high‑impedance (three‑state) condition. This prevents bus contention. Options B and C describe undefined or illegal states, while D misinterprets the effect of RD/WR on bus driving.

Q10. If both RD (pin 22) and WR (pin 23) are asserted low at the same time, how does the 8253 interpret the situation and why is it considered undefined?

A.It performs a simultaneous read and write, updating the counter with the read value ✅
B.It treats the condition as a No‑operation and ignores the request
C.It enters an undefined state because the chip cannot resolve conflicting commands
D.It automatically selects the mode‑word register for writing
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The 8253’s control logic does not define behavior when both RD and WR are low; the hardware cannot decide whether to output data or accept input, leading to an undefined condition. Manufacturers advise avoiding this combination. Option A suggests a defined dual action, which is not specified; B and C mischaracterize the response.

Q11. When using counter 0’s OUT pin to toggle an LED, which conditions must be true for the GATE and CLK pins to achieve a stable blinking frequency?

A.GATE 0 must be held low and CLK 0 driven by a fixed‑frequency oscillator
B.GATE 0 must be high (enabled) and CLK 0 must receive a periodic clock signal
C.Both GATE 0 and CLK 0 should be tied to VCC to power the LED directly
D.GATE 0 should be pulsed while CLK 0 is left floating ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: For the LED to toggle at a predictable rate, counter 0 must be enabled (GATE 0 high) and receive a regular clock on CLK 0; this allows the counter to decrement and generate OUT pulses. Holding GATE low would stop counting, and tying CLK to VCC would not produce a clock edge, so the LED would not blink. Option D describes an invalid configuration, while A disables counting entirely. Option B correctly describes the required conditions.

🔗 Related Topics (MCQs)