📝 Keyboard/Display Mode Set of 8279 (9 MCQs)
000 Command Format for Keyboard and Display Selection
The Keyboard/Display Mode Set command initializes the fundamental operating configuration of the 8279. Its eight-bit format is 000DDKKK. The most significant three bits identify the mode-set command, DD selects display size and entry direction, and KKK determines keyboard scanning operation, including two-key lockout, N-key rollover, sensor matrix and strobed input modes.
DD Field for Display Size and Entry Direction
The DD field offers four configurations. 00 selects eight eight-bit characters with left entry, 01 selects sixteen characters with left entry, 10 selects eight characters with right entry and 11 selects sixteen characters with right entry. The selection determines how display RAM contents are presented and how new data is positioned.
KKK Field for Keyboard and Sensor Configuration
000 selects encoded scan with two-key lockout, 001 selects decoded scan with two-key lockout, 010 and 011 select encoded and decoded N-key rollover, respectively. 100 and 101 select encoded and decoded sensor matrix operation, while 110 and 111 select strobed input with encoded and decoded display scanning.
Example of Selecting a Particular Keyboard Display Mode
To configure an eight-character right-entry display with encoded N-key rollover, set DD to 10 and KKK to 010. Combining these fields gives 00010010B, equivalent to 12H. Writing this value to the command register establishes the selected display and keyboard configuration.
Relationship Between Mode Selection and Scan Hardware
The selected keyboard mode determines how SL0–SL3 scan outputs interact with RL0–RL7 return lines. Display size and entry direction determine the use of display RAM positions. Encoded or decoded scanning also affects the available display scan positions, linking keyboard configuration with external display hardware.
Misconceptions About Keyboard/Display Mode Set
'The first three bits select the display size' is incorrect because DD determines display configuration. 'KKK selects only two keyboard modes' overlooks the eight available combinations. 'DD equal to 11 means sixteen-digit left entry' is incorrect because it selects sixteen-digit right entry.
Mode-Set Binary Construction and Configuration Questions
Practise constructing command words from DD and KKK fields and converting the results into hexadecimal. Memorize the four display selections and eight keyboard mode codes. Questions may present a required keyboard and display arrangement and ask for its command byte or require identification of the effects of encoded and decoded scan selection.
Keyboard and Display Mode Selection Terminology
- Mode Set - Initializes keyboard and display operation.
- DD - Selects display configuration.
- KKK - Selects keyboard operating mode.
- Encoded Scan - Uses binary scan signals.
- Decoded Scan - Uses one-of-four scan outputs.
- N-Key Rollover - Supports multiple valid key presses.
📝 All Keyboard/Display Mode Set of 8279 MCQs
Q1. To generate a periodic interrupt using counter 1, which pins must be used for the gate and clock inputs?
📖 Explanation: The correct choice is Pin 14 (GATE 1) and Pin 15 (CLK 1) because those pins are defined as the gate and clock inputs for counter 1. Option A pairs an output pin with a gate pin, which cannot provide the clock signal. Option C mixes pins from counter 2, and option D includes the ground pin, which does not affect timing. Using the proper gate and clock pins ensures the counter receives enable and timing pulses, allowing it to generate the desired periodic interrupt.
Q2. What function does the CS (Chip Select) pin perform in the 8253 device?
📖 Explanation: CS is an active‑low input, meaning the device becomes enabled only when the pin is at a low voltage. Therefore option C correctly describes its function. Option A is opposite because a high level does not enable the chip. Option B misstates the effect of a low level, and option D confuses CS with a clock input. Recognizing the active‑low nature of CS is essential for proper interfacing, preventing accidental activation when the line is idle high.
Q3. A programmer wants to load a new count value into counter 0. Which combination of control signals should be asserted?
📖 Explanation: The table defines the “Load counter 0” operation as CS low, RD high, WR low, and address bits A1 = 0, A0 = 0, which matches option A. Option B describes a write‑mode word for counter 1, not a load operation. Option C has CS high, which disables the device, so no loading occurs. Option D mixes signals for a different action (read counter 2). Selecting the correct control‑signal pattern ensures the CPU writes the count value to the intended counter without unintended side effects.
Q4. How do the A0 and A1 address lines determine which counter or register is selected?
📖 Explanation: The correct mapping is 00 → counter 0, 01 → counter 1, 10 → counter 2, and 11 → the control word register, which is described in option D. Option B mistakenly swaps the order of counters 1 and 2. Option A reverses the mapping entirely, and option C claims the lines are unused, which is false. Understanding this binary selection scheme allows designers to address the desired counter or register directly from the CPU’s address bus.
Q5. Which pin on the 8253 is designated as the ground terminal?
📖 Explanation: Pin 12 is specified as the ground terminal, providing the reference voltage for the entire chip. Option A (Pin 10) is an output pin for counter 0, option C (Pin 21) is the Chip Select input, and option D (Pin 24) supplies +5 V. Using the correct ground pin is crucial for reliable operation because an improper ground connection can cause erratic timing or complete failure of the counters.
Q6. A CPU needs to read the current value of counter 2 while counter 1 is being loaded with a new count. Which control‑signal combination correctly performs the read without interfering with the load operation?
📖 Explanation: Reading counter 2 requires the pattern CS low, RD low, WR high, and address bits A1 = 1, A0 = 0, which is exactly option A. Option B corresponds to loading counter 1, not a read operation. Option C disables the device because CS is high, preventing any transaction. Option D represents a “No operation” state, so no data would be transferred. By using the proper signals, the CPU can obtain the counter value while the other counter’s load process proceeds independently.
Q7. Why is the Chip Select (CS) input designed as an active‑low signal rather than active‑high?
📖 Explanation: The primary reason for an active‑low CS is that when the line is high (the default state), the device remains disabled, preventing accidental activation on a floating bus. This simplifies system design and reduces the chance of glitches when multiple chips share the same bus. Options A and B misstate the benefits, and option D is unrelated to the logic level choice. Recognizing this design convention helps engineers avoid unintended device activation during system initialization.
Q8. Given the control‑signal pattern CS=0, RD=0, WR=1, A1=1, A0=1, what action does the 8253 perform?
📖 Explanation: The table lists the combination CS = 0, RD = 0, WR = 1, A1 = 1, A0 = 1 as the “No operation (3‑state)” condition, making option D correct. Option A corresponds to loading counter 0, which requires WR low. Option B requires A1 = 1, A0 = 1 with WR low, not high. Option C would need A1 = 1, A0 = 0. Understanding these signal patterns prevents accidental writes or reads that could corrupt counter values.
Q9. When the RD line is driven low, what direction does data flow between the 8253 and the CPU?
📖 Explanation: A low on RD signals that the CPU is ready to receive data, so the 8253 places the requested byte on its data bus for the CPU to read, which matches option B. Option A describes the opposite direction (a write operation), which uses the WR line. Option C is incorrect because a low RD explicitly enables a read. Option D is impossible because the bus is unidirectional during a read cycle. Correctly interpreting RD ensures proper timing of read operations in a hardware interface.