๐ŸŽ“ BookMCQ
โ† Back to 12. Direct Memory Access Controller: 8257

๐Ÿ“ Data Bus Buffer of 8257 (8 MCQs)

Eight-Bit Bidirectional Interface to the System Data Bus

The 8257 data bus buffer is an eight-bit, bidirectional, three-state interface between the controller and the system data bus. It allows the 8085A to program channel registers and the mode set register or read selected register contents. During DMA operation, it also carries the high-order byte of the generated memory address to an external address latch.

CPU Register Access Through the D0โ€“D7 Buffer

When the 8257 operates as a slave, the buffer receives data from the processor during register writes and sends register contents to the processor during reads. The read/write logic selects the required register using A0โ€“A3, CS and I/O control signals. The buffer's three-state capability permits it to disconnect when another bus master controls the system.

Address Presentation During the DMA Master Cycle

After acquiring the system bus, the 8257 places the lower eight address bits on A0โ€“A7 and sends the upper eight bits through D0โ€“D7. ADSTB causes an external 8212 latch to capture that upper byte and maintain it on A8โ€“A15. The data bus can then be used for the actual peripheral-memory transfer.

Example of Presenting a Sixteen-Bit Memory Address

For memory address 4A36H, the 8257 outputs 36H on A0โ€“A7 and 4AH on D0โ€“D7. The ADSTB signal latches 4AH into the external address latch, establishing A8โ€“A15. Once the high byte is stored, the shared data bus is available for the transferred data.

Separating Address Transfer from DMA Data Movement

The buffer supports CPU programming and the brief address-output phase of a DMA cycle; it does not act as the storage location for the data block. During the transfer phase, memory and the selected peripheral exchange the data over the system data path. This separation allows the address and data to use shared bus connections at different times.

Correcting Errors About the Shared Data Bus

'The complete 16-bit address appears on D0โ€“D7' is incorrect because those lines carry only the upper byte. 'The data bus buffer stores every transferred byte' is incorrect because it is an interface, not a data memory. 'The buffer is always enabled' is incorrect because its three-state outputs support bus isolation.

Address Byte and Buffer Operations in Examination Questions

Trace the roles of A0โ€“A7, D0โ€“D7 and ADSTB when a 16-bit address is presented. Practise splitting an address into its low and high bytes, and identify the purpose of the 8212 latch. Also distinguish register programming through the buffer from the subsequent transfer of data between memory and a peripheral.

Data Bus and Address Latch Terms

  • D0โ€“D7 - Eight-bit bidirectional data bus.
  • Three-State Buffer - Supports bus disconnection.
  • A0โ€“A7 - Carries the low address byte.
  • ADSTB - Latches the high address byte.
  • 8212 - External eight-bit address latch.
  • A8โ€“A15 - Carries the high address byte.
2
Easy
4
Medium
2
Hard

๐Ÿ“ All Data Bus Buffer of 8257 MCQs

Q1. What is the maximum number of DMA channels that the Intel 8257 controller can support?

A.2
B.4 โœ…
C.8
D.16
๐Ÿ’ก Difficulty: easy | โœ… Correct: B

๐Ÿ“– Explanation: The Intel 8257 is designed with four independent channels, each capable of handling a separate DMA transfer. Therefore the maximum number of channels it can support is four, making option B correct. Options A and C underestimate and overestimate the hardware capability, while option D suggests sixteen channels, which the 8257 does not provide. Knowing the channel count is essential when planning system architecture and peripheral connections.

Q2. Why does using DMA reduce CPU involvement during large data transfers?

A.CPU is freed from moving each byte, allowing it to perform other tasks. โœ…
B.DMA uses a faster clock than the CPU.
C.DMA compresses data before transfer.
D.DMA eliminates the need for address lines.
๐Ÿ’ก Difficulty: easy | โœ… Correct: A

๐Ÿ“– Explanation: DMA moves data directly between memory and an I/O device, so the CPU no longer needs to fetch each byte, store it in the accumulator, and write it back. This frees the processor to execute other instructions, improving overall system throughput. Option A states this benefit, making it correct. Option B is false because DMA does not change clock speed, option C is incorrect as DMA does not compress data, and option D misrepresents the role of address lines.

Q3. A system using the 8257 sets the address register of channel 2 to 0x3000 and requests a transfer of 2000 bytes. Assuming the address increments after each byte, what address will the address register contain after the transfer completes?

A.14288 โœ…
B.16000
C.16384
D.10752
๐Ÿ’ก Difficulty: medium | โœ… Correct: A

๐Ÿ“– Explanation: The address register starts at 0x3000. For each of the 2000 bytes transferred, the address increments by one. Adding 2000 (decimal) to 0x3000 gives 0x3000 + 0x07D0 = 0x37D0. Therefore after the transfer the register holds 0x37D0, which matches option A. Options B, C, and D result from incorrect arithmetic or neglecting the increment, so they are wrong. This calculation demonstrates how the DMA controller updates its internal address pointer after each byte, a behavior essential for sequential block transfers.

Q4. In the 8257 count register, which bits indicate the type of DMA operation to be performed?

A.The two least significant bits
B.The two most significant bits โœ…
C.All bits are used for counting only
D.Only the middle eight bits
๐Ÿ’ก Difficulty: medium | โœ… Correct: B

๐Ÿ“– Explanation: Within the 8257 count register, the two most significant bits are reserved to define the transfer mode, such as read, write, or verify operations. This makes option B the correct choice. Option A incorrectly points to the least significant bits, which are used for the actual byte count. Options C and D misunderstand the registerโ€™s purpose, as the count register does not serve any function beyond counting and mode indication.

Q5. If autoโ€‘initialization is disabled on an 8257 channel and a transfer of 512 bytes finishes, what is the controllerโ€™s next action?

A.It automatically restarts the same transfer
B.It raises an interrupt and waits for new programming โœ…
C.It continues transferring with the same address
D.It disables the DMA request line permanently
๐Ÿ’ก Difficulty: medium | โœ… Correct: B

๐Ÿ“– Explanation: When autoโ€‘initialization is turned off, the 8257 does not reload the address and count registers after a transfer finishes. Consequently, once the 512โ€‘byte block is moved, the controller signals completion, typically via an interrupt, and then waits for the programmer to load new values before starting another transfer. Option B describes this behavior correctly. Options A and C suggest automatic restart, which only occurs with autoโ€‘initialization enabled, and option D incorrectly claims permanent disabling of the request line.

Q6. During a DMA request, how does the 8257 coordinate bus arbitration with the CPU, and why is the acknowledge (ACK) signal critical?

A.The 8257 asserts HOLD, CPU releases buses, and ACK tells peripheral that transfer may begin โœ…
B.The 8257 directly controls the CPU clock, and ACK resets the CPU
C.The 8257 does not interact with the CPU; ACK is only for peripheral timing
D.The 8257 uses ACK to signal the end of the entire program
๐Ÿ’ก Difficulty: hard | โœ… Correct: A

๐Ÿ“– Explanation: The 8257 initiates DMA by asserting the HOLD line, causing the CPU to release the address and data buses. While the CPU is in a busโ€‘grant state, the DMA controller takes control of the buses to perform the transfer. The peripheral then receives an ACK signal, confirming that the bus is now allocated to the DMA operation and that data can be moved safely. Option A correctly outlines this sequence. Options B, C, and D misstate the role of ACK or ignore the arbitration process, making them incorrect.

Q7. Two peripherals simultaneously request DMA service. Channel 0 has higher priority than channel 1. Which channel will be granted first, and what happens to the other request?

A.Channel 1 gets service first; channel 0 is denied
B.Channel 0 gets service first; channel 1 remains pending until channel 0 finishes โœ…
C.Both channels share the bus simultaneously
D.The 8257 randomly selects one channel
๐Ÿ’ก Difficulty: hard | โœ… Correct: B

๐Ÿ“– Explanation: The 8257 resolves simultaneous DMA requests by priority: lower channel numbers have higher priority unless programmed otherwise. When channels 0 and 1 both request service, channel 0 is granted first because it has the highest priority. The controller then services channel 0 while keeping channel 1โ€™s request pending. After channel 0 completes, the pending request on channel 1 is serviced. Option B captures this behavior. Options A and C contradict the priority rule, and option D suggests randomness, which the 8257 does not use.

Q8. A designer wants to transfer a block of 1024 bytes from memory to a printer using channel 3. The count register is loaded with 0x03FF. After the transfer, what value will the count register hold?

A.0 โœ…
B.1
C.1023
D.1024
๐Ÿ’ก Difficulty: medium | โœ… Correct: A

๐Ÿ“– Explanation: The count register holds the number of bytes remaining to be transferred. It is decremented after each byte is moved. Starting with 0x03FF (which equals 1023 in decimal) and transferring 1024 bytes, the register underflows to 0x0000 after the final decrement. Therefore the register ends up at zero, matching option A. Options B and D give nonโ€‘zero values, and option C repeats the initial value, all of which are incorrect for a completed transfer.

๐Ÿ”— Related Topics (MCQs)