Appendix D Register-Level Programming
National Instruments Corporation
D-35
PC-LPM-16/PnP User Manual
UP/DOWN bit in Command Register 2 is cleared—the software uses
the following scan sequence:
channel 3, channel 2, channel 1, channel 0, channel 3, channel 2,
channel 1, channel 0, channel 3, and so on.
Perform the following steps to select the analog input channel:
1.
Program the UP/DOWN bit in Command Register 2 if the bit is not
already set to the desired value. Common Register 2 must always
be programmed before Command Register 1.
Note:
The UP function is not yet supported by NI-DAQ. NI-DAQ will support the
UP function in a future release.
2.
Write the configuration value indicating the highest channel
number in the scan sequence to Command Register 1. You must set
the SCANEN* bit during this first write to Command Register 1.
3.
Write the same configuration value again to Command Register 1.
The SCANEN* bit, however, must be cleared during the second
write to Command Register 1.
Use either counter 0 or EXTCONV* to control the scanning interval.
A/D Interrupt Programming
You can use an interrupt to service the data acquisition operation. To
use the conversion interrupt, set the FIFOINTEN bit in Command
Register 1. If this bit is set, an interrupt is generated whenever the
DAVAIL bit in the Status Register is set. Clear this interrupt condition
by reading the FIFO, which empties its contents.
Programming the Digital I/O Circuitry
DIN0 through DIN7 (pins 22 through 29) of the I/O connector are
dedicated digital input lines. They are monitored by the Digital Input
Register. An 8-bit reading of the Digital Input Register returns the
current state of these digital input lines. DOUT0 through DOUT7
(pins 30 through 37) of the I/O connector are dedicated digital output
lines. These lines are always driven by the Digital Output Register. An
8-bit writing to the Digital Output Register drives the new digital value
to these lines. At startup, all of the digital output lines are initiated to
zero state.
a.Book : l.Appendix D Page 35 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 ...