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

📝 Interfacing of 8279 with 8085 (23 MCQs)

Eight-Bit Data Bus Connection Between 8085 and 8279

The 8279 interfaces with the Intel 8085 through an eight-bit data bus, address selection and read/write control signals. The data lines DB0–DB7 connect to the processor data bus, allowing command words, display information, keyboard entries and status values to be transferred. External address-decoding circuitry generates the active-low chip-select signal.

Command and Data Register Selection Through A0

The A0 input distinguishes command/status operations from ordinary data transfers. When A0 is high, the processor writes commands or reads the status word. When A0 is low, it reads keyboard or display data and writes display RAM. A1 and A2 are not required for this internal selection because the 8279 uses its single A0 input.

Read Write Controls and Interrupt Connection

CS selects the 8279, RD controls reading and WR controls writing, with all three signals active low. The IRQ output requests processor attention when keyboard or sensor information is available. It can connect to an appropriate 8085 interrupt input through suitable interface logic, depending on the system's interrupt design.

Example of Configuring and Reading the Keyboard Interface

Assume the 8279 is assigned command port 82H and data port 80H. Execute MVI A,00H; OUT 82H to configure eight-digit left entry with encoded two-key lockout. The processor can then read the status through the command/status port and retrieve available keyboard codes through the data port.

Connection of Scan, Return and Display Signals

SL0–SL3 connect to keyboard and display scanning circuits, while RL0–RL7 receive keyboard or sensor conditions. OUT A0–A3 and OUT B0–B3 supply display data to external drivers, and BD controls blanking. These connections allow one peripheral IC to manage both input detection and multiplexed display output.

Misconceptions About 8085–8279 Interfacing

'The 8279 uses A0 to select Counter 0 or Counter 1' confuses it with other peripheral devices. 'A0 low means command access' is incorrect because command access requires A0 high. 'IRQ transfers keyboard data directly into the CPU' is incorrect because IRQ only signals a request and data must be read separately.

Interfacing Connections and Assembly Programming Questions

Identify the DB0–DB7 connections and functions of CS, A0, RD and WR. Practise distinguishing command writes, status reads and data transfers. Trace IRQ generation and subsequent FIFO reading, and identify the scan, return and display-output connections required to build a complete 8085 keyboard/display interface.

8085–8279 Interfacing and Signal Terminology

  • DB0–DB7 - Connect the processor data bus.
  • CS - Selects the 8279 interface.
  • A0 - Distinguishes command and data access.
  • RD - Controls data reading.
  • WR - Controls command and data writing.
  • IRQ - Requests processor interrupt service.
4
Easy
11
Medium
8
Hard

📝 All Interfacing of 8279 with 8085 MCQs

Q1. Which pin on the 8253 provides the ground connection?

A.Pin 10
B.Pin 12 ✅
C.Pin 21
D.Pin 24
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The ground terminal of the 8253 is assigned to pin 12. Connecting this pin to the system ground ensures that all internal circuits share a common reference voltage, preventing floating voltages that could cause erratic behavior. Pin 10 is an output for counter 0, pin 21 is the chip‑select input, and pin 24 supplies +5 V. Using the correct ground pin is essential for reliable operation of the timer in any interfacing scenario.

Q2. What is the active level of the Chip Select (CS) input on the 8253?

A.Active high
B.Active low ✅
C.Active toggle
D.No effect
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The CS pin on the 8253 is an active‑low signal, meaning the device becomes enabled when the pin is driven low. This convention allows multiple peripherals to share the same bus lines without interference, because a high level leaves the chip in a high‑impedance state. The other options describe different logic conventions that do not apply to the CS pin, so only the active‑low description is correct.

Q3. Why must the A0 and A1 address lines be connected to the microprocessor's address bus when selecting counters?

A.They provide power to the counters
B.They carry data values to be counted
C.They select which counter or control word register is accessed ✅
D.They generate the clock signal for the counters
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: A0 and A1 are used as address selectors; their binary combination determines whether counter 0, counter 1, counter 2, or the mode‑word register is being addressed. By wiring these lines to the CPU’s address bus, the processor can issue read or write commands to the appropriate internal register. Power and clock are supplied through separate pins, and data values are transferred via the data bus, not through A0/A1.

Q4. How does the combination CS=0, RD=0, WR=1, A1=0, A0=1 affect the 8253?

A.Loads counter 0
B.Loads counter 1 ✅
C.Loads counter 2
D.Writes the mode word
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: When CS is low (device enabled) and RD is low while WR is high, the circuit performs a read operation. The address bits A1=0 and A0=1 select counter 1, so the current count of counter 1 is placed on the data bus for the CPU to read. Loading a counter requires WR low, and writing the mode word requires both A1 and A0 equal to 1, which are not present in this pattern.

Q5. What role does the GATE input of a counter play in the counting operation?

A.It provides the clock source
B.It determines the counter’s initial value
C.It enables or disables counting based on an external signal ✅
D.It outputs the count value
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The GATE pin acts as an enable line for the counter. When the gate input is asserted (typically high), the counter receives clock pulses and increments; when the gate is low, counting is halted regardless of the clock. This allows external logic to start or stop timing without altering the clock source. The clock source is supplied to the CLK pin, the initial value is loaded via the data bus, and the count is read from the OUT pin.

Q6. Explain the effect of tying the CLK input of counter 2 to a 1 MHz clock while the gate is held low.

A.Counter 2 will count at 1 MHz
B.Counter 2 will count at half the clock rate
C.Counter 2 will not count at all ✅
D.Counter 2 will generate a pulse each clock cycle
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: Even though the clock signal is present, the gate input controls whether the counter actually responds to those pulses. With the gate held low, counting is disabled, so the counter’s internal count will remain unchanged regardless of the 1 MHz clock. The output pin will stay in its idle state, and no timing events will be generated until the gate goes high.

Q7. How does the Write Mode Word operation differ from loading a counter value in terms of control signal combinations?

A.Both use WR low and the same address bits
B.Write Mode Word uses WR low with A1=A0=1, while loading a counter uses WR low with specific A1/A0 values ✅
C.Write Mode Word requires RD low, loading a counter requires CS high
D.Both require CS high and RD low
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Writing a mode word selects the mode register, which is done by asserting WR low while CS is low and setting both address lines A1 and A0 to 1. Loading a counter value also uses WR low and CS low, but the address bits correspond to the particular counter (e.g., 00 for counter 0). Therefore the distinction lies in the address pattern, not in the use of RD or CS alone.

Q8. In a system where multiple 8253 timers share the same data bus, why is it important that the CS pin be active low?

A.Because active‑low signals reduce power consumption
B.Because it allows the device to be disabled when not selected, preventing bus contention ✅
C.Because it synchronizes the clock to the CPU
D.Because it provides a reset function
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: When several devices are connected to a common bus, only one should drive the bus at any time. An active‑low CS ensures that the timer is enabled only when its CS line is pulled low; otherwise the chip places its outputs in a high‑impedance state, avoiding conflicts with other peripherals. This behavior is crucial for reliable bus arbitration and prevents spurious data from corrupting communication.

Q9. What would happen if the RD pin is mistakenly left high while attempting to read a counter value?

A.The counter value would be latched correctly
B.The counter would reset to zero
C.No data would be placed on the bus, resulting in an invalid read ✅
D.The counter would stop counting
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The RD (Read) pin must be driven low to tell the 8253 to place the selected counter’s value onto the data bus. If RD remains high, the device does not perform the read operation, so the bus retains whatever data was previously present, leading to an incorrect or undefined reading. The counter’s count itself is unaffected; it continues counting unless the gate is disabled.

Q10. A designer needs to generate a 500 Hz square wave using counter 0. Which pin connections and control word settings should be used?

A.Connect OUT0 to a speaker, set mode 3, load count 2000 ✅
B.Connect OUT0 to a speaker, set mode 2, load count 1000
C.Connect OUT0 to a speaker, set mode 0, load count 2000
D.Connect OUT0 to a speaker, set mode 1, load count 500
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A 500 Hz square wave requires a toggle every 1 ms. In mode 3 (square‑wave generator), the output toggles each time the count reaches zero, so the required count is the clock frequency divided by twice the desired frequency. Assuming a 1 MHz clock, the count is 1 MHz / (2 × 500) = 1000. However, mode 3 automatically reloads the count, so the effective count is 1000, which corresponds to option A when the clock is 2 MHz. The other modes either produce different waveforms or require different counts, making option A the correct configuration.

Q11. If the microprocessor writes a mode word to select mode 2 (rate generator) for counter 1, which control signal pattern must be present?

A.CS=0, WR=0, A1=0, A0=1
B.CS=0, WR=0, A1=1, A0=1 ✅
C.CS=0, WR=1, A1=1, A0=0
D.CS=0, WR=0, A1=1, A0=0
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Writing a mode word always requires CS low and WR low. The address bits that select the mode‑word register are A1=1 and A0=1. Therefore the correct combination is CS=0, WR=0, A1=1, A0=1. The other patterns either address a specific counter (A1=0, A0=1) or involve a read operation (WR=1), which would not load the mode word.

Q12. Suppose pin 14 (GATE1) is connected to an external enable signal that goes low for 200 µs every 1 ms. What is the maximum frequency that counter 1 can count?

A.5 kHz
B.2 kHz
C.500 Hz
D.1 kHz ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: The gate is low for 200 µs in each 1 ms period, allowing counting only during that interval. The effective counting window is 200 µs, which corresponds to a maximum count rate of 1 / 200 µs = 5 kHz. However, because the gate repeats every 1 ms, the average counting frequency is limited to the reciprocal of the period, i.e., 1 kHz. The question asks for the maximum frequency the counter can count during the enabled window, which is 5 kHz, but the overall repeat rate is 1 kHz; the most appropriate answer is 1 kHz.

Q13. A system requires that counter 2 generate an interrupt after counting 1024 clock pulses. Which combination of pins and mode word should be programmed?

A.Use OUT2 as interrupt line, mode 2, load count 1024 ✅
B.Use OUT2 as interrupt line, mode 0, load count 1024
C.Use GATE2 to trigger interrupt, mode 3, load count 512
D.Use RD to read count, mode 1, load count 1024
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Mode 2 (rate generator) automatically generates a terminal count pulse after the programmed number of counts, which can be wired to an interrupt line. Loading the count value 1024 causes the counter to issue a pulse after exactly 1024 clock cycles. Mode 0 would require external gating, mode 3 toggles the output continuously, and using RD does not produce an interrupt, making option A the correct configuration.

Q14. During testing, the output of counter 0 (OUT0) stays permanently high. Which of the following faults is most likely?

A.GATE0 is stuck low ✅
B.CLK0 is not connected
C.CS is floating high
D.WR is held low continuously
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: If GATE0 is held low, the counter never receives clock pulses, so its output remains in the idle high state for mode 0 or mode 2. A missing clock would cause the output to stay low or high depending on the mode, but a permanently high level is characteristic of a disabled counter due to a low gate. A floating CS could place the device in high‑impedance, not a constant high, and WR low affects data loading, not the output level.

Q15. An engineer wants to cascade two counters to create a 16‑bit timer using counters 0 and 1. Which pins must be connected together and why?

A.OUT0 to GATE1, because the overflow of counter 0 enables counter 1 ✅
B.CLK0 to CLK1, to synchronize clocks
C.CS to CS, to enable both simultaneously
D.A0 to A1, to select the combined register
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Cascading counters requires the overflow (OUT) of the lower‑order counter to act as the gate for the higher‑order counter. Connecting OUT0 to GATE1 causes each time counter 0 rolls over, counter 1 receives a single enable pulse, effectively extending the count range to 16 bits. Clock synchronization is not required because each counter uses its own clock, and CS is already common to both devices.

Q16. If the WR line is asserted low while CS is high, what is the result on the 8253?

A.The mode word is written successfully
B.A counter value is loaded
C.No operation occurs because the device is disabled ✅
D.The chip resets
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: When CS is high, the 8253 is disabled regardless of the state of WR. Therefore any write attempt—including mode‑word or counter loading—has no effect. The device remains in a high‑impedance state, and no internal registers are altered. Resetting the chip requires a separate reset pin, which is not part of the WR/CS combination.

Q17. A microcontroller reads the count of counter 2 by asserting RD low. Which pins must be correctly addressed to ensure the read operation targets counter 2?

A.A1=1, A0=0 ✅
B.A1=0, A0=1
C.A1=1, A0=1
D.A1=0, A0=0
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Reading counter 2 requires the address bits to select that specific counter. The binary code for counter 2 is A1=1 and A0=0. With CS low and RD low, the device places the current count of counter 2 on the data bus. The other address combinations select counters 0, 1, or the mode‑word register, so they would not retrieve the desired value.

Q18. The clock input to counter 0 is driven by a 2 MHz oscillator. To achieve a delay of 0.5 seconds, what count value should be loaded into counter 0?

A.1000
B.2500
C.500000 ✅
D.1000000
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: A 0.5‑second delay with a 2 MHz clock requires counting 2 MHz × 0.5 s = 1 000 000 clock cycles. In mode 0 (interrupt on terminal count), the counter decrements from the loaded value to zero, so the required count is 1 000 000. Loading 500 000 would give only 0.25 seconds, and the smaller values would produce much shorter delays.

Q19. When the A0 and A1 lines are set to binary 10, which internal register of the 8253 is selected?

A.Counter 0
B.Counter 1
C.Counter 2 ✅
D.Mode‑word register
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The binary combination 10 (A1=1, A0=0) corresponds to counter 2 in the address map of the 8253. Counter 0 is selected with 00, counter 1 with 01, and the mode‑word register with 11. Therefore, setting A0 and A1 to 10 directs any subsequent read or write operation to the third counter.

Q20. If the system requires that the OUT2 pin toggle every time the gate input receives a high‑to‑low transition, which mode should be programmed?

A.Mode 0 (interrupt on terminal count)
B.Mode 1 (hardware retriggerable one‑shot) ✅
C.Mode 2 (rate generator)
D.Mode 3 (square‑wave generator)
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Mode 1 is the hardware retriggerable one‑shot mode, where each negative edge on the gate input restarts the counting cycle and causes the OUT pin to produce a single pulse. This behavior matches the requirement of toggling on each high‑to‑low transition. Mode 0 produces a pulse only on terminal count, mode 2 generates periodic pulses independent of the gate, and mode 3 creates a continuous square wave.

Q21. During power‑up, the CS pin is inadvertently left floating. What unpredictable behavior might occur?

A.The chip will always be disabled
B.The chip may randomly enable and interfere with the bus ✅
C.The chip will reset continuously
D.The chip will ignore all clock inputs
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A floating CS pin can pick up noise and switch between low and high states, causing the 8253 to intermittently enable and place its outputs on the data bus. This can lead to bus contention with other devices, resulting in corrupted data or erratic timing. A permanently high CS would simply keep the chip disabled, while a reset pin or clock inputs are unrelated to the CS condition.

Q22. A designer connects the CLK2 pin to a clock that is half the frequency of the microprocessor's clock. How does this affect the timing of events generated by counter 2?

A.Events occur twice as fast
B.Events occur at the same rate as the microprocessor
C.Events occur half as fast ✅
D.Events become asynchronous and unpredictable
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The counting speed of a timer is directly proportional to its clock frequency. Supplying a clock that is half the microprocessor's frequency means counter 2 advances at half the rate of the CPU clock, so any delay or pulse generated by the counter will take twice as long as it would with a full‑speed clock. The events remain synchronous with the supplied clock, but their duration is doubled.

Q23. To read the mode word of counter 1, which sequence of control signals should be used?

A.CS=0, RD=0, WR=1, A1=1, A0=1 ✅
B.CS=0, RD=0, WR=1, A1=0, A0=1
C.CS=0, RD=0, WR=0, A1=1, A0=1
D.CS=0, RD=1, WR=0, A1=1, A0=0
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Reading the mode‑word register requires CS low, RD low, and WR high (no write). The address bits for the mode register are A1=1 and A0=1. Therefore the correct control signal combination is CS=0, RD=0, WR=1, A1=1, A0=1. The other options either address a specific counter, attempt a write operation, or leave RD high, which would not place the mode word on the data bus.

🔗 Related Topics (MCQs)