Guidelines for Selecting FIFO Use (FIFOEN and FIFOTH)

The below data is a guideline for interrupt use that will work in typical applications and systems. Each application’s optimum performance will be based on the processor speed, operating system, sampling method, and need to obtain data as soon as possible.

Sample rate

Suggested use

Rate < 500Hz

FIFO not needed; one interrupt per sample or scan is acceptable.

 

This setting applies to both single A/D samples and A/D scans.

500 <= Rate < 50,000 FIFO should be used to reduce interrupt overhead. Set FIFOTH = 1 to select the lower threshold of 256 samples to allow the application program to obtain A/D data as quickly as possible.

Rate >= 50,000Hz FIFO should be used. Set FIFOTH = 0 to select the higher threshold of 1024 samples to reduce the interrupt rate and resulting overhead.

A/D Operation Table

The following table describes the behavior of the A/D circuit in the 8 major operating modes based on scan, FIFO, and interrupt settings.

AINTE

FIFOEN

SCANEN

Operation

 

 

 

 

 

 

0

0

0

Single A/D conversions are triggered by write to B+0.

 

 

 

 

STS stays high during the A/D conversion.

 

 

 

 

No interrupt occurs.

 

 

 

 

The user program monitors STS and reads A/D data when it goes low.

0

0

1

A/D scans are triggered by write to B+0. All channels between LOW and HIGH

 

 

 

will be sampled.

 

 

 

 

STS stays high during the entire scan (multiple A/D conversions).

 

 

 

No interrupt occurs.

 

 

 

 

The user program monitors STS and reads all A/D values when it goes low.

0

1

0

Same operation as case 000 above.

 

 

 

 

 

 

0

1

1

Same operation as case 001 above.

 

 

 

 

 

1

0

0

Single A/D conversions are triggered by the source selected with CLKSEL.

 

 

 

STS stays high during the A/D conversion.

 

 

 

 

A/D interrupt occurs after each conversion is done (when STS goes low).

 

 

 

The interrupt routine reads one A/D sample each time it runs.

 

1

0

1

A/D scans are triggered by the source selected with CLKSEL.

 

 

 

STS stays high during the entire scan (multiple A/D conversions).

 

 

 

A/D interrupt occurs after the entire scan is complete.

 

 

 

 

The interrupt routine reads out one entire A/D scan (multiple values) each time

 

 

 

it runs.

 

1

1

0

Single A/D conversions are triggered by the source selected with CLKSEL.

 

 

 

STS stays high during the A/D conversion.

 

 

 

 

A/D interrupt occurs when HF goes high (256 A/D conversions have occurred).

 

 

 

The interrupt routine reads out 256 samples (half the FIFO) each time it runs.

1

1

1

A/D scans are triggered by the source selected with CLKSEL.

 

 

 

STS stays high during the entire scan (multiple A/D conversions).

 

 

 

A/D interrupt occurs after the scan is complete AND HF is high (i.e. an integral

 

 

 

no. of scans has occurred and the FIFO is half full or more).

 

 

 

 

The interrupt routine reads out enough complete scans to equal 256 or more

 

 

 

samples each time it runs.

 

 

 

 

Diamond-MM-48-AT User Manual V1.01

Page 33

Page 33
Image 33
Diamond Power Products MM-48-AT Guidelines for Selecting Fifo Use Fifoen and Fifoth, Operation Table, Ainte Fifoen Scanen