📝 Interfacing of 8251A in 8085A Microprocessor (10 MCQs)
Connecting the 8251A USART to the 8085A System
The 8251A interfaces with the 8085A through an eight-bit parallel data bus, address selection and read/write control signals. The serial side connects to external communication equipment through TxD and RxD. Additional clock and modem-control connections support timing and handshaking. This arrangement allows processor software to exchange serial characters using ordinary I/O operations.
Data Bus, Chip Selection and Control Connections
The 8251A D0–D7 pins connect to the processor's data bus. Address-decoding logic generates active-low CS, while C/D selects data or control/status access. The 8085A I/O read and write signals connect to RD and WR. RESET and CLK provide device initialization and internal timing.
Serial Data, Clock and Modem Connections
TxD connects to the external serial receiver, and RxD accepts incoming serial data. TxC and RxC receive the required transmit and receive clock signals, often from a baud-rate generator. DTR, RTS, CTS and DSR provide modem-control connections when external handshaking is required.
Example of Assigning Separate Data and Status Ports
Suppose port 80H is decoded with C/D low and port 81H with C/D high. The 8085 uses OUT 80H to transmit a character and IN 80H to read received data. IN 81H reads status, while OUT 81H writes mode or command information according to the initialization sequence.
Address Demultiplexing and Serial Interface Support
Because the 8085A multiplexes its lower address and data lines, an external latch controlled by ALE may be needed to preserve the address for decoding. The resulting chip-select signal identifies the USART, while the data bus carries the selected byte. A suitable level-conversion circuit may be required between TTL-compatible signals and external communication-line standards.
Misunderstandings About USART Bus Connections
'TxD connects to the 8085 data bus' is incorrect because TxD is a serial output. 'C/D high selects the transmit data register' is incorrect because it selects control or status access. 'The baud-rate generator is always inside the 8251A' is incorrect because TxC and RxC require external clock signals.
Interfacing Signals and I/O Port Tracing in Exams
Trace D0–D7, CS, C/D, RD and WR from the 8085A to the USART. Distinguish data-port and control/status-port operations, and identify the roles of ALE, TxD, RxD, TxC and RxC. Practise explaining address decoding and the external circuitry needed for serial-line compatibility.
USART Interfacing and External Signal Terms
- CS - Selects the 8251A.
- C/D - Selects data or control/status access.
- ALE - Enables low-address latching.
- TxD - Sends serial data externally.
- RxD - Receives external serial data.
- Baud Generator - Supplies serial timing clocks.
📝 All Interfacing of 8251A in 8085A Microprocessor MCQs
Q1. How many bits of the terminal count register are used to store the number of bytes to be transferred?
📖 Explanation: The terminal count register is 16 bits wide, but only the lower 14 bits hold the byte count, allowing up to bytes per DMA operation. Option C states 14-bit, which matches the specification. Options A, B, and D either overstate or understate the usable bits, so they are incorrect. Understanding this limit helps designers size buffers correctly for DMA transfers.
Q2. Why are the two most significant bits of the terminal count register used to indicate the DMA operation type?
📖 Explanation: The two MSBs act as operation flags, telling the 8257 whether the transfer is memory‑to‑memory, I/O‑to‑memory, or memory‑to‑I/O. This enables the controller to select the proper read/write logic. Options B and C describe unrelated functions, and D is incorrect because the bits do not increase the transfer size; they only classify the operation.
Q3. How does the Address Enable (AEN) pin affect the operation of the 8257 DMA controller?
📖 Explanation: When AEN is asserted, the DMA controller is permitted to output addresses onto the address bus, which is essential for fetching data during a transfer. Option C correctly describes this behavior. Option A reverses the effect, Option B misstates the role (the CPU does not need AEN), and Option D is false because the controller can still increment addresses.
Q4. What is the purpose of the HRQ (HOLD Request) signal in a DMA transfer?
📖 Explanation: HRQ is generated by the DMA controller to request control of the system bus; the CPU must respond by asserting HOLD, allowing the DMA to perform its transfer without interference. Option A captures this handshake. Options B, C, and D describe other signals (DACK, peripheral start, and RESET) that are unrelated to HRQ's function.
Q5. A CPU wants to move bytes from memory address to a peripheral using channel 2. Which register values should be loaded?
📖 Explanation: The address register must hold the start address, 0x2000. The terminal count register must contain the exact byte count, 8192 decimal, which fits within the 14‑bit field. Option C provides these values. Option A repeats the address, Option B adds the count to the address incorrectly, and Option D swaps the fields, making them wrong.
Q6. If a terminal‑count interrupt occurs before all bytes are transferred, which is the most likely cause?
📖 Explanation: An early interrupt usually means the controller believes the required byte count has been reached, which happens when the terminal count register holds a value less than the total bytes to move. Option A reflects this. Options B and C describe unrelated issues (channel disable, missed interrupt), and D concerns bus contention, not count mismatches.
Q7. A designer connects two peripherals to channels 0 and 1 of the 8257. Channel 0 must transfer 12 K bytes and channel 1 must transfer 4 K bytes simultaneously. Which MODE register setting ensures both channels operate in cascade mode without bus contention?
📖 Explanation: Cascade mode (binary 11) lets two channels share the same bus cycle, preventing contention while allowing simultaneous transfers. Setting both channels to this mode satisfies the requirement. Option A would cause separate bus cycles and potential conflicts. Option B mixes modes, risking timing mismatches. Option D also mixes modes, which does not guarantee contention‑free operation.
Q8. During a DMA operation, the CPU asserts the HOLD line while the 8257 asserts HRQ. If the CPU fails to release the bus, what will be the effect on the DMA transfer and which pin signals indicate the problem?
📖 Explanation: When the CPU does not honor the HOLD request, the DMA controller cannot obtain bus control, so the transfer halts. The DMA acknowledges requests via the DACK pins; if the bus is not granted, DACK stays low, signaling the stall. Option B correctly describes this. Option A is opposite, Option C involves READY which is unrelated, and Option D misattributes the effect to MEMR.
Q9. Explain how the 8257’s internal Read/Write Logic interacts with the MEMR and MEMW signals to perform a memory‑to‑peripheral DMA transfer.
📖 Explanation: During a memory‑to‑peripheral transfer, the controller’s read/write block asserts MEMR to fetch a byte from memory, then asserts MEMW to write that byte to the I/O device. This sequencing ensures correct data movement without CPU involvement. Option A captures this flow. Option B omits the write phase, Option C suggests simultaneous signals which would cause bus conflicts, and Option D denies the internal role, all of which are incorrect.
Q10. A system uses channel 3 for a block transfer that must stop after exactly 16 K bytes. Which value must be programmed into the terminal count register, and why is this the maximum?
📖 Explanation: The 14‑bit field can hold a maximum count of decimal, which is 0x4000 in hexadecimal. Programming this value tells the controller to stop after 16 K bytes, the greatest amount the DMA can handle without extra logic. Option A is correct. Option B exceeds the 14‑bit limit, Option C gives one less than the maximum, and Option D misinterprets the MSB as a stop flag.