Appendix D Register-Level Programming
PC-LPM-16/PnP User Manual
D-28
National Instruments Corporation
Analog Input Circuitry Programming Sequence
1.
Initiate an A/D conversion.
A low to high transition on OUT0 or on EXTCONV* initiates A/D
conversion. Clear the CALEN bit in Command Register 2 to enable
counter 0 and the EXTCONV*.
When an A/D conversion is initiated, the ADC stores the result in
the A/D FIFO at the end of its conversion cycle. If EXTCONV*
initiates the conversion, OUT0 must be set high.
2.
Read the A/D conversion result.
Read the A/D FIFO Register to get the A/D conversion results.
Before you read the A/D FIFO, however, you must read the Status
Register to determine whether the A/D FIFO contains any results.
To read the A/D conversion results, complete the following steps:
a.
Read the Status Register (8-bit read).
b.
If the DAVAIL bit is set (bit 0), read the A/D FIFO Low-Byte
Register first, then read the A/D FIFO High-Byte Register to
get the result. The first reading returns the low byte of 16-bit
data, and the second reading returns the high byte.
Reading the Low and High-Byte A/D FIFO Registers removes the A/D
conversion result from the A/D FIFO.
The DAVAIL bit indicates whether one or more A/D conversion results
are stored in the A/D FIFO. If the DAVAIL bit is cleared, the A/D FIFO
is empty and reading the A/D FIFO Register returns meaningless data.
When an A/D conversion is initiated, the DAVAIL bit should be set
after 20
µ
s. If you use EXTCONV* for A/D timing, the DAVAIL bit
should be set 20
µ
s after a rising edge in EXTCONV*.
An A/D FIFO overflow condition occurs if you initiate more than
256 conversions and store them in the A/D FIFO before reading the A/D
FIFO Register. If this condition occurs, the OVERFLOW bit is set in
the Status Register 2 to indicate that one or more A/D conversion
results have been lost because of FIFO overflow. Write to the A/D Clear
Register to reset this error flag.
a.Book : l.Appendix D Page 28 Wednesday, November 20, 1996 6:36 PM
Содержание PC-LPM-16/PnP
Страница 50: ...Appendix B MSM82C53 Data Sheet PC LPM 16 PnP User Manual B 2 National Instruments Corporation ...
Страница 51: ...Appendix B MSM82C53 Data Sheet National Instruments Corporation B 3 PC LPM 16 PnP User Manual ...
Страница 52: ...Appendix B MSM82C53 Data Sheet PC LPM 16 PnP User Manual B 4 National Instruments Corporation ...
Страница 53: ...Appendix B MSM82C53 Data Sheet National Instruments Corporation B 5 PC LPM 16 PnP User Manual ...
Страница 54: ...Appendix B MSM82C53 Data Sheet PC LPM 16 PnP User Manual B 6 National Instruments Corporation ...
Страница 55: ...Appendix B MSM82C53 Data Sheet National Instruments Corporation B 7 PC LPM 16 PnP User Manual ...
Страница 56: ...Appendix B MSM82C53 Data Sheet PC LPM 16 PnP User Manual B 8 National Instruments Corporation ...
Страница 57: ...Appendix B MSM82C53 Data Sheet National Instruments Corporation B 9 PC LPM 16 PnP User Manual ...
Страница 58: ...Appendix B MSM82C53 Data Sheet PC LPM 16 PnP User Manual B 10 National Instruments Corporation ...
Страница 59: ...Appendix B MSM82C53 Data Sheet National Instruments Corporation B 11 PC LPM 16 PnP User Manual ...
Страница 60: ...Appendix B MSM82C53 Data Sheet PC LPM 16 PnP User Manual B 12 National Instruments Corporation ...