🎓 BookMCQ
← Back to 14. Serial Communication and Programmable Communication Interface

📝 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.
2
Easy
5
Medium
3
Hard

📝 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?

A.16-bit
B.8-bit
C.14-bit ✅
D.12-bit
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The terminal count register is 16 bits wide, but only the lower 14 bits hold the byte count, allowing up to 214=163842^{14}=16384 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?

A.They allow the controller to distinguish between different transfer modes such as memory‑to‑memory or I/O‑to‑memory. ✅
B.They provide error‑checking parity for the count value.
C.They are reserved for future expansion and have no current function.
D.They double the maximum transfer size when set to 1.
💡 Difficulty: easy | ✅ Correct: A

📖 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?

A.AEN disables the address bus so the DMA cannot access memory.
B.AEN enables the CPU to supply addresses while DMA is idle.
C.AEN allows the DMA controller to place addresses on the bus during a transfer. ✅
D.AEN forces the DMA controller to use fixed addresses only.
💡 Difficulty: medium | ✅ Correct: C

📖 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?

A.It tells the CPU to release the bus so the DMA can take control. ✅
B.It acknowledges that the DMA has completed a transfer.
C.It signals the peripheral to start sending data.
D.It resets the DMA controller after each byte.
💡 Difficulty: medium | ✅ Correct: A

📖 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 8 KiB=81928\text{ KiB}=8192 bytes from memory address 0x20000x2000 to a peripheral using channel 2. Which register values should be loaded?

A.DMA Address Register = 0x2000, Terminal Count Register = 0x2000
B.DMA Address Register = 0x2000, Terminal Count Register = 0x2000 + 8192
C.DMA Address Register = 0x2000, Terminal Count Register = 8192 ✅
D.DMA Address Register = 0x2000 + 8192, Terminal Count Register = 0x2000
💡 Difficulty: medium | ✅ Correct: C

📖 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?

A.The terminal count register was programmed with a value smaller than the actual data size. ✅
B.The DMA channel was disabled during the transfer.
C.The CPU failed to acknowledge the interrupt.
D.The address bus was held low by another device.
💡 Difficulty: medium | ✅ Correct: A

📖 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?

A.Set both channels to single‑transfer mode (00) and enable auto‑initialize. ✅
B.Configure channel 0 as block‑transfer (01) and channel 1 as demand‑transfer (10).
C.Program both channels for cascade mode (11) and enable address increment.
D.Use demand‑transfer for channel 0 and block‑transfer for channel 1.
💡 Difficulty: hard | ✅ Correct: A

📖 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?

A.The transfer will continue; the DACK pin will toggle to show progress.
B.The transfer will stall; the DACK pin will remain inactive, indicating no acknowledgment. ✅
C.The transfer will complete but with corrupted data; the READY pin will go low.
D.The transfer will restart from the beginning; the MEMR pin will pulse repeatedly.
💡 Difficulty: hard | ✅ Correct: B

📖 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.

A.The logic generates MEMR for reads from memory and MEMW for writes to the peripheral, coordinating data flow. ✅
B.It only uses MEMR; MEMW is ignored during DMA.
C.It toggles MEMR and MEMW simultaneously for each byte transferred.
D.It relies on external control; the internal logic does not affect MEMR or MEMW.
💡 Difficulty: hard | ✅ Correct: A

📖 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?

A.0x4000 because the lower 14 bits represent 214=163842^{14}=16384 bytes. ✅
B.0xFFFF because the register is 16‑bit wide.
C.0x3FFF because the upper two bits must be zero for block mode.
D.0x8000 because the MSB indicates the end of transfer.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The 14‑bit field can hold a maximum count of 214=163842^{14}=16384 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.

🔗 Related Topics (MCQs)