AN00006.TXT Advanced Communication Board Developer's Toolkit 1995 ---------------------------------------------------------------------- ---------------------------------------------------------------------- Subject: Using DMA with Interrupts. The most efficient way to program with an ACB adapter is using a combination of interrupts and Direct Memory Access (DMA). This combination yields the highest throughput on an ACB. Using DMA to transmit and receive data involves block transfers and no software overhead is involved on a per character basis. Adding the ability to interrupt for re-initialization of a DMA transfer is ideal for applications that require higher data rates, because absolutely no polling is involved. When using HDLC or SDLC, the SCC may be programmed to interrupt at the end of a valid frame. This method may be implemented on any ACB that supports DMA. If HDLC or SDLC interrupts are not used for re-initialization, the DMA transfer is handled differently. Instead of interrupting at the end of a frame, the interrupt should occur when the DMA transfer is complete, or when Terminal Count is reached. When programming DMA, the DMA controller is programmed with the number of bytes to be transferred minus one. The DMA controller counts down from the number programmed into the DMA Count Register and the DMA transfer is complete when the DMA counter rolls over from 0 to FFFF hex (65535 decimal). When Terminal Count has been reached (i.e. FFFF hex), the DMA controller generates a signal on the PC bus to notify add-on cards that a DMA transfer is complete. For the ACB-VI and ACB-530, there is special circuitry on the card that generate and interrupt at the end of a DMA transfer. Please refer to the user manual for appropriate jumper options. If development is not for an ACB-VI or ACB-530, interrupting at the end of a DMA transfer is accomplished with a modification to the ACB. Later versions of the ACB-II, ACB-III, ACB-IV and ACB-V have this modification build on the card. To use the modification, please refer to the directions below. When the modification circuit has been enabled, program the SCC to interrupt on external status DCD interrupt. When the DMA transfer is complete, DCD will toggle active and then inactive causing two external status interrupts and the interrupt service routine should reinitialize the DMA transfer. DMA Terminal Count Interrupt Modification: ACB-II ACB-III ACB-IV ACB-V