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

📝 Modem Control in 8085A Microprocessor (8 MCQs)

External Device Coordination Through 8251A Modem Signals

The modem-control section of the 8251A provides four general-purpose interface signals for coordinating serial communication with external equipment. DTR and RTS are software-controlled outputs, while CTS and DSR are inputs. These signals support readiness and transmission handshaking between the 8085A-based terminal and a modem or another compatible communication device.

Output Functions of DTR and RTS

The command instruction controls DTR and RTS. Setting the DTR control bit forces the DTR output low, while setting the RTS bit forces RTS low. These outputs are normally used to indicate data-terminal readiness and request permission to send, although their general-purpose nature allows other control uses.

Input Functions of CTS and DSR

CTS is an active-low input that permits transmission when the transmitter is enabled. If CTS is high, the transmitter waits before starting a new transmission, although data already being transmitted is completed. DSR is a general-purpose input whose condition can be examined through the status register.

Example of Handshaking Before a Character Is Sent

Suppose the 8085 enables TxEN and writes a character into the transmit buffer. If CTS remains high, transmission cannot begin. When the external modem changes CTS to low, the 8251A is permitted to send the queued character through TxD at the programmed clock rate.

Coordination with Transmitter Readiness and External Equipment

Modem-control signals complement TxRDY and TxEMPTY, which report internal transmitter conditions. A communication program can first establish the required DTR and RTS states, examine DSR and wait for CTS before sending data. These hardware signals help avoid transmitting when an external device is not ready to receive.

Correcting Errors About Signal Direction and Active Levels

'CTS is an output controlled by the command word' is incorrect because CTS is an external input. 'DTR high means the command has forced DTR low' is incorrect because setting its command bit forces the physical output low. 'DSR directly enables the transmitter' is incorrect because CTS and TxEN govern transmission.

Command-Bit and Modem-Signal Interpretation for Exams

Classify DTR and RTS as outputs and CTS and DSR as inputs. Explain the active-low transmission-permission condition on CTS and identify the command-word bits that control DTR and RTS. Distinguish modem handshaking from character readiness, and trace the effect of a changing CTS signal on transmission.

Modem Control and Handshake Terms

  • DTR - Software-controlled terminal-ready output.
  • RTS - Software-controlled request-to-send output.
  • CTS - Active-low transmission-permission input.
  • DSR - External device-status input.
  • TxEN - Enables the transmitter.
  • Handshaking - Coordinates readiness between devices.
2
Easy
4
Medium
2
Hard

📝 All Modem Control in 8085A Microprocessor MCQs

Q1. What is the maximum number of bytes that a single DMA transfer can handle using the 8257 controller?

A.16384 bytes ✅
B.32768 bytes
C.8192 bytes
D.4096 bytes
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The 8257 uses a 16‑bit terminal count register, but only the lower 14 bits store the byte count. Those 14 bits can represent 214=163842^{14}=16384 distinct values, so a DMA operation can move up to 16384 bytes (16 KB) before the controller stops. Option A matches this limit. Options B, C, and D describe larger or smaller limits that the register cannot represent, making them incorrect. This limit is important when planning bulk data moves, ensuring the programmer does not exceed the DMA capacity.

Q2. Why are the two most significant bits of the mode set register used to indicate the operation to be performed?

A.They select read or write mode
B.They define the transfer direction and mode ✅
C.They enable address latch
D.They reset the controller
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The two MSBs of the mode set register encode the type of DMA operation—such as demand, single, block, or cascade—so the controller knows how to handle the transfer. This encoding lets the same hardware support different transfer strategies. Option B correctly describes this purpose. Option A is too narrow (read/write is handled elsewhere), Option C confuses the AEN pin function, and Option D is unrelated to mode selection. Understanding this encoding helps designers configure the controller for the required data flow.

Q3. A system must move 20 KB of data from memory to a peripheral using the 8257. Can a single DMA transfer satisfy this requirement?

A.Yes, because 20 KB < 16 KB
B.No, because it exceeds the 16 KB limit ✅
C.Yes, using two consecutive DMA cycles
D.No, DMA cannot transfer more than 8 KB
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Each DMA channel can transfer at most 16 KB (2142^{14} bytes). Since 20 KB = 20480 bytes is larger than 16384 bytes, a single channel cannot handle the whole block; the transfer must be broken into at least two operations or use another method. Option B states the correct limitation. Option A incorrectly assumes the limit is larger, Option C suggests a workaround that the question does not allow, and Option D gives an incorrect maximum size. Recognizing this limit prevents buffer‑overrun errors in real‑world designs.

Q4. What effect does setting the AEN (Address Enable) pin high have on the 8257 controller?

A.It enables the address latch for DMA registers ✅
B.It disables all DMA activity
C.It selects channel 0 for operation
D.It resets the controller
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When AEN is asserted, the internal address latch captures the high‑order address bits supplied by the CPU, allowing the DMA controller to use those bits for subsequent transfers. This is essential for correctly locating the memory region involved in the DMA operation. Option A describes this behavior. Option B is opposite to the actual effect, Option C misidentifies AEN as a channel‑select signal, and Option D confuses it with the RESET line. Proper use of AEN ensures that the controller works with the intended memory addresses.

Q5. Device 0 asserts DRQ0 while the CPU is ready. Which sequence correctly describes the handshake signals for a DMA transfer on channel 0?

A.CPU reads data immediately, then asserts DACK0
B.HRQ goes high, CPU asserts HLDA, then DACK0 goes low ✅
C.DACK0 goes low first, then HRQ goes high
D.No handshake is required; the transfer starts automatically
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: When a DMA request (DRQ) appears, the controller raises HRQ to ask the CPU to release the bus. The CPU responds by asserting HLDA, indicating that the bus is free. After HLDA is active, the controller pulls the appropriate DACK line (DACK0 for channel 0) low, granting the channel permission to transfer data. Option B follows this exact order. Options A and C reverse the order, violating the required bus‑grant protocol, and Option D ignores the essential handshake, leading to bus contention.

Q6. How does the HRQ (HOLD Request) line interact with the CPU during a DMA transfer?

A.HRQ forces the CPU to stop; HLDA signals that the bus is released ✅
B.HRQ is ignored by the CPU and has no effect
C.HRQ directly moves data without CPU involvement
D.HRQ toggles the RESET line to restart the system
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When the DMA controller needs control of the system bus, it asserts HRQ. The CPU, upon detecting HRQ, completes its current instruction and then asserts HLDA (HOLD Acknowledge) to indicate that it has relinquished the bus. Only after HLDA is asserted does the DMA controller begin the transfer. Option A captures this handshake. Option B is false because the CPU must respond, Option C describes a mode that bypasses the CPU but still requires HRQ/HLDA, and Option D confuses HRQ with the reset signal. This interaction is critical for preventing bus conflicts in real hardware.

Q7. A programmer wants to move 10 KB of data starting at memory address 0x2000 to a peripheral using channel 2. Which values should be loaded into the DMA address register and terminal count register?

A.Address 0x2000, Count 0x2800 ✅
B.Address 0x3000, Count 0x1F40
C.Address 0x2000, Count 0x4000
D.Address 0x1000, Count 0x2800
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: 10 KB equals 10240 decimal, which is 0x28000x2800 in hexadecimal. The DMA address register must contain the start address, 0x2000. The terminal count register stores the number of bytes to transfer, using its lower 14 bits; loading 0x2800 fits within that range. Option A provides the correct pair. Option B uses a different start address and an incorrect count, Option C exceeds the 16 KB limit, and Option D uses the wrong start address. Loading the correct values ensures the DMA controller moves exactly the intended block of data.

Q8. If two DMA request lines (DRQ1 and DRQ3) become active at the same time, which channel will the 8257 prioritize?

A.Channel with the lower number (channel 1) ✅
B.Channel with the higher number (channel 3)
C.A round‑robin algorithm selects the next channel
D.External priority pins determine the winner
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The 8257 resolves simultaneous requests by giving priority to the channel with the lowest numerical identifier; channel 0 has the highest priority, followed by channel 1, and so on. Therefore, when DRQ1 and DRQ3 are both asserted, channel 1 is serviced first. Option A reflects this rule. Option B reverses the priority, Option C suggests a scheduling method the controller does not implement, and Option D introduces external pins that the 8257 does not provide. Knowing the built‑in priority scheme helps designers avoid unexpected ordering in multi‑device systems.

🔗 Related Topics (MCQs)