📝 Programmable Communication Interface IC 8251 in 8085A Microprocessor (9 MCQs)
Role of the 8251A as a Programmable USART
The Intel 8251A provides a programmable serial communication interface for the 8085A microprocessor. It converts parallel characters from the processor into serial output and reconstructs received serial characters into parallel data. Software configures its communication mode, character length, parity, stop bits and synchronization method, allowing the same hardware to support different serial communication arrangements.
Separate Registers for Control, Data and Status Information
The 8251A uses an eight-bit bidirectional data bus buffer and separate internal data, control and status registers. The C/D input distinguishes data transfers from control or status access. Control writes configure the mode or command functions, while data writes and reads use the transmitter and receiver buffers.
Programming Sequence and Data-Transfer Readiness
After reset, the first control-word write establishes the mode. In synchronous operation, one or two synchronization characters follow as programmed; in asynchronous operation, the command word follows directly. The command enables the transmitter and receiver. TxRDY and RxRDY then indicate when the processor can exchange characters.
Example of Enabling Eight-Bit Asynchronous Communication
For asynchronous operation at a 16-times clock factor, eight data bits, no parity and one stop bit, the 8085 writes 4EH as the mode instruction. It then writes 05H as the command instruction to enable transmission and reception. The external CTS input must be low for transmission to proceed.
Connecting the USART to Serial Devices and Processor Software
The parallel interface connects to the 8085A data bus, while TxD and RxD connect to the serial communication path. TxC and RxC provide bit timing, and modem-control lines coordinate external devices. Software can use polling or interrupts to respond to ready signals and transfer characters efficiently.
Separating Mode Instructions, Commands and Data Transfers
'Every control write changes the mode' is incorrect because only the first control write after reset is interpreted as the mode instruction. 'C/D low selects the status register' is incorrect because it selects data access. 'The command word carries the character being transmitted' is incorrect because the data port supplies transmit characters.
8251A Register Selection and Programming Questions
Identify the function of C/D, CS, RD and WR, and distinguish control access from data access. Trace the required reset, mode and command sequence, inserting synchronization characters when necessary. Practise decoding mode values and explaining how TxRDY, RxRDY and status flags coordinate processor communication.
Programmable USART Register and Interface Terms
- C/D - Selects data or control/status access.
- Mode Instruction - Defines the communication format.
- Command Instruction - Controls USART operation.
- Status Register - Reports readiness and errors.
- Tx Buffer - Holds outgoing character data.
- Rx Buffer - Holds received character data.
📝 All Programmable Communication Interface IC 8251 in 8085A Microprocessor MCQs
Q1. If a CPU loads the DMA Address Register with and the Terminal Count Register with , how many bytes will be transferred before the DMA channel stops?
📖 Explanation: The Terminal Count Register stores the byte count in its lower 14 bits. The value equals binary ; the lower 14 bits are all ones, which represent bytes. The two most significant bits are used for operation type, so they do not add to the count. Therefore the DMA channel will transfer exactly 16383 bytes before stopping. Options A, C, and D describe incorrect byte totals.
Q2. What is the maximum number of bytes that a single DMA operation can transfer using the 8257?
📖 Explanation: The 8257 can move up to 2¹⁴ bytes in a single DMA operation because only the lower 14 bits of the Terminal Count Register are usable for the byte count. This equals bytes, or 16 K. The other options either double this value, halve it, or give a non‑power‑of‑two figure, which the hardware does not support. Consequently the correct maximum transfer size is 16384 bytes.
Q3. Two peripherals, a printer and a disk controller, simultaneously assert DRQ0 and DRQ2 while the CPU issues a HOLD request. Which of the following best describes the sequence of events?
📖 Explanation: When the CPU receives a HOLD request (HRQ), it ceases bus activity and asserts HOLD, allowing the DMA controller to take control. The controller examines pending DRQ lines, giving priority to the lowest‑numbered channel, so it asserts DACK0 for the printer first. After that transfer completes, the controller proceeds to the next pending request, asserting DACK2 for the disk controller. This ordered handling ensures data integrity and matches the 8257 priority scheme. The other choices describe illegal or reversed behavior.
Q4. What do the two most significant bits of the Terminal Count Register indicate?
📖 Explanation: The terminal count register’s upper two bits are reserved to specify the operation mode for the selected channel. They tell the controller whether the channel will perform a read‑from‑memory/write‑to‑I/O cycle or a write‑to‑memory/read‑from‑I/O cycle. This selection determines the direction of data flow during the DMA transfer. The other options describe functions that are assigned to different registers or signals, making them incorrect.
Q5. Which pair of signals is used by the CPU to temporarily pause its bus cycles while the DMA controller takes control?
📖 Explanation: When a DMA transfer is needed, the DMA controller asserts HRQ (Hold Request) to the CPU. In response, the CPU places its bus on hold by asserting the HOLD line, effectively pausing its own bus cycles. This handshake lets the DMA controller assume control of the bus without interference. DRQ and DACK manage peripheral requests and acknowledgments, while MEMR/MEMW relate to memory operations, and RESET/READY serve different system functions, so they are not the correct pair for this purpose.
Q6. How does the DMA Request (DRQ) differ from the DMA Acknowledge (DACK) signal?
📖 Explanation: DRQ is asserted by an I/O device that needs the DMA controller’s services, indicating that it has data to send or receive. The DMA controller, after granting control of the bus, asserts the corresponding DACK line to acknowledge the request and to synchronize the actual data movement. Thus DRQ originates from the peripheral, while DACK comes from the controller. The other statements mischaracterize the directionality or timing of these signals.
Q7. How many independent DMA channels does the 8257 provide?
📖 Explanation: The 8257 DMA controller is designed with four separate channels, typically labeled Channel 0 through Channel 3. Each channel has its own address and count registers, allowing simultaneous or sequential transfers for up to four different peripherals. This architecture distinguishes it from simpler controllers that might have only one or two channels. The other numbers listed do not match the documented capability of the 8257.
Q8. During a multi‑byte transfer on Channel 2, which DMA Acknowledge line must be asserted by the controller to enable the transfer?
📖 Explanation: Each DMA channel is paired with a specific DACK line: Channel 0 with DACK0, Channel 1 with DACK1, Channel 2 with DACK2, and Channel 3 with DACK3. When the controller initiates a transfer on Channel 2, it asserts DACK2 to inform the peripheral that the bus is ready for data exchange. Using any other DACK line would either target the wrong channel or cause no peripheral response, making the transfer fail. Therefore DACK2 is the correct line for Channel 2.
Q9. If a programmer loads the Terminal Count Register with a value that exceeds the 14‑bit limit, how does the 8257 handle the excess bits?
📖 Explanation: The 8257 only interprets the lower 14 bits of the Terminal Count Register for the byte count; any higher bits are discarded. Consequently, if a value larger than is written, the controller will treat the count as the truncated 14‑bit value, performing a transfer of that many bytes only. The device does not raise an interrupt, split the operation, or use a MARK flag for this condition, so the other options are incorrect.