4.2 AD Interrupt Mode Reference

The tables on the following pages describe the behavior of the board and the driver during A/D interrupt operations with various combinations of settings. Each board has slightly different options and characteristics that affect which options apply. These differences are described here.

Note that even when FIFO is disabled, all boards with FIFO still use the FIFO to hold A/D conversions during scan operations. In these cases, FIFO disabled means the interrupt will occur after each scan, while FIFO enabled means the interrupt will occur after enough scans occur to reach or exceed the FIFO threshold.

Prometheus

The FIFO is always enabled. To "disable" the FIFO during interrupt operations, set FIFO depth = scan size (or 1 for single conversions). In this case the descriptions for Modes 0-3 apply. Otherwise modes 4-7 apply.

The FIFO depth is 48. The FIFO threshold is programmable. The power-on default FIFO threshold is 16.

Hercules-EBX

All tables below apply as described.

The FIFO depth is 2048. The FIFO threshold is programmable. The power-on default FIFO threshold is 1024.

Diamond-MM-48-AT

All tables below apply as described.

The FIFO depth is 2048. The FIFO threshold is programmable to 1024 or 256. The power-on default FIFO threshold is 1024.

Diamond-MM-32-AT

All tables below apply as described.

The FIFO depth is 512. The FIFO threshold is programmable. The power-on default FIFO threshold is 256.

Diamond-MM-16-AT, Diamond-MM-AT

All tables below apply as described.

The FIFO depth is 512. The FIFO threshold is fixed at 256.

Diamond-MM

This board has no FIFO. Modes 4-7 do not apply. For A/D scans, the interrupt occurs after the first A/D conversion is complete, and the interrupt routine completes the scan operation for the rest of the channels in the scan range. The interrupt rate is still equal to the scan rate.

Zircon-MM-DX

This board has no FIFO. Modes 4-7 do not apply. For A/D scans, the interrupt occurs after the first A/D conversion is complete, and the interrupt routine completes the scan operation for the rest of the channels in the scan range. The interrupt rate is still equal to the scan rate. Note that Zircon-MM-LC has no counter/timer and is therefore unable to generate A/D interrupts.

Mode 0: FIFO = 0, Scan = 0, Recycle = 0

Sampling Operation

Each A/D clock generates a single A/D conversion on the current channel. The channel register is then incremented to the next in the range (or resets to the lowest if already at the end). All A/D samples are evenly spaced apart in time.

Sample Rate

The overall sample rate is equal to the A/D clock rate. The sample rate for each channel in the range is equal to the A/D clock rate divided by the number of channels in the range.

Interrupt Occurrence

An interrupt occurs after each conversion is complete.

Interrupt Rate

The interrupt rate is equal to the A/D clock rate.

Interrupt Operation

The interrupt routine reads a single A/D value from the board and stores it in the program's sample buffer.

Data Buffer

The buffer size is equal to the number of A/D samples to be taken.

Termination

After the specified number of conversions is complete, the interrupt operation automatically terminates. The user may also terminate early by calling the function dscCancelOp.

Mode 1: FIFO = 0, Scan = 0, Recycle = 1

Sampling Operation

Each A/D clock generates a single A/D conversion on the current channel. The channel register is then incremented to the next in the range (or resets to the lowest if already at the end). All A/D samples are evenly spaced apart in time.

Sample Rate

The overall sample rate is equal to the A/D clock rate. The sample rate for each channel in the range is equal to the A/D clock rate divided by the number of channels in the range.

Interrupt Occurrence

An interrupt occurs after each conversion is complete.

Interrupt Rate

The interrupt rate is equal to the A/D clock rate.

Interrupt Operation

The interrupt routine reads a single A/D value from the board and stores it in the program's sample buffer.

Data Buffer

The buffer size must be equal to the number of samples num_conversions specified in the function call. This parameter is not related to the total number of samples to be taken, since recycle mode is enabled.

Termination

After the specified number of A/D conversions is complete, the interrupt operation returns to the beginning of the buffer and repeats. The user may terminate the operation at any time by calling dscCancelOp.

Mode 2: FIFO = 0, Scan = 1, Recycle = 0

Sampling Operation

Each A/D clock generates an A/D conversion on all channels in the programmed channel range, beginning with the low channel.

Sample Rate

The overall sample rate is equal to the A/D clock rate times the scan size. The sample rate for each channel in the range is equal to the A/D clock rate.

Interrupt Occurrence

An interrupt occurs after each entire scan is complete.

Interrupt Rate

The interrupt rate is equal to the A/D clock rate.

Interrupt Operation

The interrupt routine reads a complete scan of data in from the board each time it runs and stores the data in the driver's sample buffer.

Data Buffer

The buffer size is equal to the number of scans to be performed times the scan size.

Termination

After the specified number of A/D conversions is complete, the interrupt operation automatically terminates. The user may also terminate early by calling the function dscCancelOp.

Mode 3: FIFO = 0, Scan = 1, Recycle = 1

Sampling Operation

Each A/D clock generates an A/D conversion on all channels in the programmed channel range, beginning with the low channel.

Sample Rate

The overall sample rate is equal to the A/D clock rate times the scan size. The sample rate for each channel in the range is equal to the A/D clock rate.

Interrupt Occurrence

An interrupt occurs after each entire scan is complete.

Interrupt Rate

The interrupt rate is equal to the A/D clock rate.

Interrupt Operation

The interrupt routine reads a complete scan of data in from the board each time it runs and stores the data in the driver's sample buffer.

Data Buffer

The buffer size must be equal to num_conversions. This number must be an integral multiple of the scan size. This number is not related to the total number of samples, since recycle mode is enabled.

Termination

After the specified number of scans (the total number of conversions divided by the scan size) is complete, the interrupt operation will return to the beginning of the buffer and repeat the process indefinitely. The user may terminate the operation at any time by calling dscCancelOp.

Mode 4: FIFO = 1, Scan = 0, Recycle = 0

Sampling Operation

Each A/D clock generates a single A/D conversion on the current channel. The channel register is then incremented to the next in the range (or resets to the lowest if already at the end). All A/D samples are evenly spaced apart in time.

Sample Rate

The overall sample rate is equal to the A/D clock rate. The sample rate for each channel in the range is equal to the A/D clock rate divided by the number of channels in the range.

Interrupt Occurrence

An interrupt occurs after the FIFO reaches or exceeds the programmed threshold.

Interrupt Rate

The interrupt rate is equal to the A/D clock rate divided by the FIFO threshold.

Interrupt Operation

The interrupt routine reads a number of A/D samples from the board equal to the FIFO depth and stores them in the program's sample buffer.

Data Buffer

The buffer size must be equal to the number of A/D samples. The buffer size and FIFO threshold must be chosen such that the buffer size is equal to an integral multiple of the FIFO threshold.

Termination

After the specified number of A/D conversions is complete, the interrupt operation automatically terminates. The user may also terminate early by calling the function dscCancelOp.

Mode 5: FIFO = 1, Scan = 0, Recycle = 1

Sampling Operation

Each A/D clock generates a single A/D conversion on the current channel. The channel register is then incremented to the next in the range (or resets to the lowest if already at the end). All A/D samples are evenly spaced apart in time.

Sample Rate

The overall sample rate is equal to the A/D clock rate. The sample rate for each channel in the range is equal to the A/D clock rate divided by the number of channels in the range.

Interrupt Occurrence

An interrupt occurs after the FIFO reaches or exceeds the programmed threshold.

Interrupt Rate

The interrupt rate is equal to the A/D clock rate divided by the FIFO threshold.

Interrupt Operation

The interrupt routine reads a number of A/D samples from the board equal to the FIFO threshold and stores them in the program's sample buffer.

Data Buffer

The buffer size must be equal to the number of samples, num_conversions, specified in the function call. This number does not indicate the total number of samples to be taken, since recycle mode is enabled. The buffer size and FIFO threshold must be chosen such that the buffer size is equal to an integral multiple of the FIFO threshold.

Termination

After the specified number of conversions is complete, the interrupt operation will return to the beginning of the buffer and repeat the process indefinitely. The user may terminate the operation at any time by calling dscCancelOp.

Mode 6: FIFO = 1, Scan = 1, Recycle = 0

Sampling Operation

Each A/D clock generates an A/D conversion on all channels in the programmed channel range, beginning with the low channel.

Sample Rate

The overall sample rate is equal to the A/D clock rate times the scan size. The sample rate for each channel in the range is equal to the A/D clock rate.

Interrupt Occurrence

An interrupt occurs after the FIFO reaches or exceeds the programmed threshold and the current scan is complete.

Interrupt Rate

The interrupt rate is equal to the A/D clock rate times the no. of channels in the scan range divided by the FIFO threshold.

Interrupt Operation

The interrupt routine reads a number of A/D samples from the board equal to the FIFO threshold and stores them in the driver's sample buffer.

Data Buffer

The buffer size must equal to the number of A/D samples to be taken. The buffer size and FIFO threshold must be chosen such that the buffer size is equal to an integral multiple of the FIFO threshold.

Termination

After the specified number of conversions is complete, the interrupt operation automatically terminates. The user may also terminate early by calling the function dscCancelOp.

Mode 7: FIFO = 1, Scan = 1, Recycle = 1

Sampling Operation

Each A/D clock generates an A/D conversion on all channels in the programmed channel range, beginning with the low channel.

Sample Rate

The overall sample rate is equal to the A/D clock rate times the scan size. The sample rate for each channel in the range is equal to the A/D clock rate.

Interrupt Occurrence

An interrupt occurs after the FIFO reaches or exceeds the programmed threshold and the current scan is complete.

Interrupt Rate

The interrupt rate is equal to the A/D clock rate times the no. of channels in the scan range divided by the FIFO threshold.

Interrupt Operation

The interrupt routine reads a number of A/D samples from the board equal to the FIFO threshold and stores them in the driver's sample buffer.

Data Buffer

The buffer size must be equal to the number of samples, num_conversions, specified in the function call. This number does not indicate the total number of samples to be taken, since recycle mode is enabled. The buffer size and FIFO threshold must be chosen such that the buffer size is qual to an integral multiple of the FIFO threshold.

Termination

After the specified number of conversions is complete, the interrupt operation will return to the beginning of the buffer and repeat the process indefinitely. The user may terminate the operation at any time by calling dscCancelOp.

Last updated