![Diamond Systems Poseidon Скачать руководство пользователя страница 85](http://html1.mh-extra.com/html/diamond-systems/poseidon/poseidon_user-manual_2494418085.webp)
FIFO Description
Poseidon uses a 1024-sample FIFO (First In First Out) memory buffer to manage A/D conversion data. It is used to
store A/D data between the time it is generated by the A/D converter and the time it is read by the user program. In
enhanced mode, the entire 1024-sample FIFO is available. In normal mode only 512 samples are available. The
FIFO may be enabled and disabled under software control.
In single-conversion mode, the FIFO features are not generally needed so FIFO use should not be selected, although,
the FIFO is still actually being used. Each A/D sample is stored in the FIFO. When the software reads the data, it
reads it out of the FIFO. In low-speed sampling, each time a conversion occurs, the program reads the data, so there
is always a one-to-one correspondence between sampling and reading. Thus, the FIFO contents never exceed one
sample.
For high-speed sampling or interrupt operation, the FIFO substantially reduces the amount of software overhead in
responding to A/D conversions as well as the interrupt rate on the bus because it enables the program to read
multiple samples rather than one at a time. In addition, the FIFO is required for sampling rates in excess of the
maximum interrupt rate possible on the bus. Generally, the fastest sustainable interrupt rate on the ISA bus running
DOS is around 40,000 per second. Since Poseidon can sample up to 250,000 times per second, the FIFO is needed
to reduce the interrupt rate at high speeds. When the interrupt routine runs, it reads multiple samples from the FIFO.
The interrupt rate is equal to the sample rate divided by the number of samples read each interrupt. On Poseidon,
this number is programmable using the register at Base+6. The usual value is 1/2 the maximum FIFO depth, or 512
samples. Therefore, the maximum interrupt rate for Poseidon is reduced to 488 per second, which easily sustainable
on any popular operating system.
Note:: If both Scan and FIFO operation are enabled, the interrupt still occurs at the programmed
FIFO threshold and the interrupt routine reads the indicated number or samples and then exits.
This happens even if the number of samples is not an integral number of scans. For example, if you
have a scan size of 10 and a FIFO threshold of 256, the first time the interrupt routine runs, it reads
256 samples, consisting of 25 full scans of all 10 channels followed by 6 samples from the next scan.
The next time the interrupt routine runs, it reads the next 256 samples, consisting of the remaining 4
samples from the last scan it started to read, the next 25 full scans of 10 samples, and the first 2
samples of the next scan. This continues until the interrupt routine ends in either one-shot or recycle
mode. In one-shot mode, the last time the interrupt routine runs it reads the entire contents of the
FIFO, making all data available.
Scan Sampling
A scan is defined as a quick burst of samples of multiple consecutive channels. For example, you may want to
sample channels 0-15 all at once, and repeat the operation each second. This would be a scan at a frequency of 1Hz.
Each time the A/D clock occurs (software command, timer, or external trigger), all 16 channels are sampled in high-
speed succession. There is a short delay of 4 – 20 microseconds between each sample in the scan. Since each clock
pulse causes all channels to be sampled, the effective sampling rate for each channel is the same as the programmed
rate, and the total sampling rate is the programmed sampling rate times the number of channels in the scan range.
Scan sampling is independent of FIFO operation. Either or both can be enabled independently.
Sequential Sampling
In sequential sampling, each clock pulse results in a single A/D conversion on the current channel. If the channel
range is set to a single channel (high channel = low channel), each conversion is performed on the same input
channel. If the channel range is set to more than one channel (high channel > low channel), then the channel counter
increments to the next channel in the range, and the next conversion is performed on that channel. When a
conversion is performed on the high channel, the channel counter resets to the low channel for the next conversion.
The intervals between all samples are equal. Since each clock pulse results in only one channel being sampled, the
effective sampling rate is the programmed sampling rate divided by the number of channels in the channel range.
Diamond Systems Corporation
Poseidon User Manual
Page 85