
113
generated when a TC cycle is received. (Note: The only way to properly terminate DMA transfers is
with a TC cycle.)
DMA may be disabled in the middle of a transfer by first disabling the host DMA controller. Then
setting serviceIntr to 1, followed by setting dmaEn to 0, and waiting for the FIFO to become empty or
full. Restarting the DMA is accomplished by enabling DMA in the host, setting dmaEn to 1, followed by
setting serviceIntr to 0.
DMA Mode - Transfers from the FIFO to the Host
(Note: In the reverse mode, the peripheral may not continue to fill the FIFO if it runs out of data to
transfer, even if the chip continues to request more data from the peripheral.)
The ECP requests a DMA cycle whenever there is data in the FIFO. The DMA controller must respond
to the request by reading data from the FIFO. The ECP will stop requesting DMA cycles when the
FIFO becomes empty or when a TC cycle is received, indicating that no more data is required. If the
ECP stops requesting DMA cycles due to the FIFO going empty, then a DMA cycle is requested again
as soon as there is one byte in the FIFO. If the ECP stops requesting DMA cycles due to the TC
cycle, then a DMA cycle is requested again when there is one byte in the FIFO, and serviceIntr has
been re-enabled.
Programmed I/O Mode or Non-DMA Mode
The ECP or parallel port FIFOs may also be operated using interrupt driven programmed I/O.
Software can determine the writeIntrThreshold, readIntrThreshold, and FIFO depth by accessing the
FIFO in Test Mode.
Programmed I/O transfers are to the ecpDFifo at 400H and ecpAFifo at 000H or from the ecpDFifo
located at 400H, or to/from the tFifo at 400H. To use the programmed I/O transfers, the host first sets
up the direction and state, sets dmaEn to 0 and serviceIntr to 0.
The ECP requests programmed I/O transfers from the host by activating the interrupt. The
programmed I/O will empty or fill the FIFO using the appropriate direction and mode.
Note: A threshold of 16 is equivalent to a threshold of 15. These two cases are treated the same.