🎓 BookMCQ
← Back to 12. Direct Memory Access Controller: 8257

📝 Block Diagram of 8257 (7 MCQs)

Functional Sections and Internal Organization of the 8257

The 8257 block diagram represents a four-channel Direct Memory Access controller that transfers data between memory and peripheral devices without routing every byte through the 8085A. Its principal sections are four DMA channels, a data bus buffer, read/write logic, control logic, a mode set register, a status word register and a priority resolver. An internal bus connects these sections for coordinated address generation and transfer control.

Channel Registers and the Priority Resolution Section

Each DMA channel contains a 16-bit address register and a 16-bit terminal count register. The address register identifies the memory location, while the count register contains a 14-bit transfer count and two operation-selection bits. The priority resolver examines DRQ0–DRQ3 and selects an eligible channel according to fixed or rotating priority.

Data and Control Paths Between the Functional Blocks

The data bus buffer connects the external D0–D7 bus to the internal bus. Read/write logic decodes register accesses using A0–A3 and the control inputs. Control logic manages bus acquisition, address generation and DMA timing, while the mode and status registers provide configuration and completion information.

Tracing a DMA Request Through the Block Diagram

Suppose a peripheral activates DRQ1 and channel 1 is enabled. The priority resolver selects the request, and control logic raises HRQ to obtain the system bus. After HLDA arrives, the controller activates DACK1, outputs the memory address and generates the required read/write signals for the selected transfer.

How the Blocks Cooperate During Direct Memory Access

The address register advances after each transfer, while the terminal count register tracks the remaining bytes. The control logic generates TC when the programmed count reaches its terminal condition. The data bus buffer and external address latch support address presentation, while the read/write logic connects the selected peripheral and memory through their control signals.

Distinguishing the Roles of the Internal Blocks

'The priority resolver stores memory addresses' is incorrect because each channel has its own address register. 'The data bus buffer performs data counting' is incorrect because address and count registers belong to individual channels. 'The status register enables DMA channels' is incorrect because channel enabling is controlled by the mode set register.

Block Diagram Connections to Identify in Examination Questions

Locate the four channel register pairs, DRQ and DACK connections, priority resolver, internal bus and three main logic sections. Be able to trace HRQ and HLDA during bus acquisition, distinguish address generation from data transfer, and identify the functions of TC, AEN and ADSTB. Remember that each channel supports a maximum 14-bit count.

Internal Blocks and DMA Control Terms

  • DMA Channel - Independent request and transfer path.
  • Address Register - Holds the memory address.
  • Terminal Count - Stores transfer length and type.
  • Priority Resolver - Selects an eligible channel.
  • Data Bus Buffer - Connects external and internal data buses.
  • HRQ - Requests control of system buses.
  • HLDA - Confirms CPU bus release.
1
Easy
4
Medium
2
Hard

📝 All Block Diagram of 8257 MCQs

Q1. How many 16‑bit registers are provided for each channel in the 8257 DMA controller?

A.One
B.Two ✅
C.Three
D.Four
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The 8257 assigns two 16‑bit registers to each channel: one holds the address for the next DMA cycle and the other holds the byte count. This dual‑register design lets the controller know where to read or write and how many bytes remain. Options A, C, and D are incorrect because each channel does not contain only one, three, or four registers; the architecture specifies exactly two.

Q2. What is the purpose of the acknowledge (AEN) signal sent by the CPU to an I/O device during a DMA request?

A.It initiates the transfer of data from the device to memory. ✅
B.It informs the device that the CPU has released the address and data buses.
C.It resets the DMA controller after the transfer.
D.It selects the DMA channel to be used.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The acknowledge signal tells the peripheral that the CPU has relinquished control of the address and data buses, allowing the 8257 to take over the bus cycles for the transfer. This coordination prevents bus contention. Option A describes the start of a transfer but not the role of the acknowledge. Option C is wrong because resetting the controller is a separate operation. Option D confuses channel selection, which is programmed beforehand, not signaled by AEN.

Q3. Why does the 8257 use the two most significant bits of the count register to indicate the type of operation?

A.They are unused and can be set arbitrarily. ✅
B.They encode the transfer mode such as read, write, or verify.
C.They store the high‑order address bits.
D.They control the priority of the channel.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The count register’s lower 14 bits hold the actual byte count, while the two most significant bits are reserved to specify the DMA operation mode (e.g., read, write, or verify). This allows the controller to interpret the request correctly without extra pins. Option A is false because the bits have a defined purpose. Option C is incorrect because address information is kept in a separate address register. Option D is wrong; priority is determined by fixed channel numbers, not by these bits.

Q4. A programmer loads the count register of channel 0 with the hexadecimal value 0x03FF before starting a DMA transfer of 1024 bytes. What will be the result of the transfer?

A.All 1024 bytes will be transferred correctly. ✅
B.Only 1023 bytes will be transferred, leaving one byte untransferred.
C.The DMA controller will generate an overflow error.
D.The transfer will not start because the count is invalid.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The count register holds the number of bytes to move. A value of 0x03FF equals 1023 decimal, so the controller will stop after moving 1023 bytes, leaving one byte untouched. Option A assumes the value is 1024, which it is not. Option C is incorrect because the controller does not flag an overflow for a simple off‑by‑one count. Option D is wrong; the count value is valid, just one less than required.

Q5. During a DMA operation on channel 2, the 8257 takes control of the bus. Which of the following best describes the CPU’s activity while the DMA transfer is in progress?

A.The CPU continues executing instructions using the address bus but not the data bus. ✅
B.The CPU is halted and does not perform any bus cycles until the DMA controller releases the bus.
C.The CPU only reads the status of the DMA controller but does not write.
D.The CPU shares the bus with the DMA controller in a time‑multiplexed fashion.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When the 8257 asserts the bus‑request line, the 8085 (or similar CPU) enters a hold state, effectively halting its instruction fetch and execution until the DMA controller signals that the transfer is complete. This prevents bus contention. Option A is incorrect because the CPU cannot use the address bus while the DMA holds it. Option C is false; the CPU does not actively monitor status during hold. Option D describes a cycle‑stealing mode not used by the 8257 in its standard operation.

Q6. In a system with four DMA channels (0 highest priority, 3 lowest), channels 1 and 3 request service at the same time. Which channel will the 8257 service first?

A.Channel 3 ✅
B.Channel 1
C.Both channels simultaneously
D.The channel with the larger count register value
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The 8257 resolves simultaneous requests by priority order: lower channel numbers have higher priority. Therefore, channel 1 (higher priority than channel 3) will be granted service first. Option A gives the lower‑priority channel, which is incorrect. Option C is impossible because the controller can service only one channel at a time. Option D is irrelevant; priority is not based on count values.

Q7. Why does the 8257 require a +5 V DC power supply for its operation?

A.It is built from CMOS technology that needs 5 V. ✅
B.It uses TTL‑compatible logic levels that operate at +5 V.
C.It needs a high voltage to drive external devices.
D.It generates its own voltage internally, so external supply is optional.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The 8257 is implemented with TTL‑compatible circuitry, which traditionally operates from a +5 V supply. This voltage defines the logic high and low thresholds used throughout the chip. Option A is incorrect because the device is not CMOS‑based. Option C misstates the purpose of the supply; the controller does not drive high‑voltage loads directly. Option D is false because the chip cannot self‑generate the required supply voltage.

🔗 Related Topics (MCQs)