You are here: Analog Inputs > CPU Readout Methods > DMA Read
STX104 Reference Manual
ContentsIndexHome
PreviousUpNext
DMA Read

Analog input data is read from the FIFO memory via Direct Memory Access (DMA).

 

We strongly encourage you to use the REP INSW instruction (or Insw() function in Linux) as it performs better than DMA and is substantially simpler to set up and use. Note that DMA performs I/O to memory transfers a byte at a time (DMA 1 and DMA 3 are byte wide transfers) while REP INSW performs I/O to memory transfers a word at a time. If you are designing a real-time system, you will have better timing control over your system by using REP INSW instruction over DMA. Since processor generated I/O cycles are faster than DMA generated cycles (typically 350ns versus 800ns), data transfer can take place faster than DMA. Note that 8-bit bus transactions (including DMA) are typically at least twice as long as 16-bit bus transactions; this alone is reason enough to avoid DMA. 

 

When DMA is enabled, the 1 mega-sample FIFO is used. 

 

In DMA mode, receiving a terminal count from the CPU will generate an interrupt, if the interrupt is enabled. If you are in DAS1602 mode (jumper M0 is installed), receiving a terminal count will set the Conversion Disable bit to false, thus disabling any additional ADC sampling. Writing 0x00 to the Conversion Disable Register will allow ADC sampling to continue. 

 

In order to use DMA, you must set up the computer’s DMA controller and page registers before enabling DMA on the STX104 board. 

 

We consider DMA a deprecated function and in the future should be avoided; it just no longer makes any sense to use, but we still continue to support it as a part of legacy functionality.

Copyright © 1997-2008 by Apex Embedded Systems. All rights reserved. Updated on Wednesday, April 02, 2008.
What do you think about this topic? Send feedback!