User's Manual

Register-Level Programming Chapter 4
Lab-NB User Manual 4-10 © National Instruments Corporation
A/D FIFO Register
Reading the A/D FIFO Register returns the next A/D conversion value stored in the A/D FIFO.
Whenever the A/D FIFO Register is read, the value read is removed from the A/D FIFO, thereby
freeing space for another A/D conversion value to be stored. Values are stored into the A/D
FIFO Register by the ADC whenever an A/D conversion is complete. Although A/D conversion
values are in 12-bit format, they are automatically sign-extended to 16 bits in the FIFO.
The A/D FIFO is emptied when all values it contains are read. The Status Register should be
read before the A/D FIFO Register is read. If the A/D FIFO contains one or more A/D
conversion values, the DAVAIL bit is set in the Status Register, and the A/D FIFO Register can
be read to retrieve a value. If the DAVAIL bit is cleared, the A/D FIFO is empty, in which case
reading the A/D FIFO Register returns meaningless information.
The values returned by reading the A/D FIFO Register are available in two different binary
formats: straight binary or two's complement binary. The binary format used is selected by the
TWOSCMP bit in the A/D Configuration Register. The bit pattern returned for either format is
given below.
Address: Base address + 0 8010 (hex)
Type: Read-only
Word Size: 16-bit
Bit Map: Straight binary mode
15 14 13 12 11 10 9 8
0 0 0 0 D11 D10 D9 D8
76543210
D7 D6 D5 D4 D3 D2 D1 D0
Bit Name Description
15–0 D<15..0> Data Bit—These bits contain the straight binary result of a 12-bit
A/D conversion. Bits D<15..12> are always 0 in straight binary
mode. Values read, therefore, range from 0 to +4,095 decimal
(0000 to 0FFF hex). Straight binary mode is useful for unipolar
analog input readings because all values read reflect a positive
polarity input signal.