National Instruments PC-LPM-16/PnP User Manual page 76

Multifunction i/o board for the pc
Table of Contents

Advertisement

Appendix D
Register-Level Programming
Command Register 1
Command Register 1 indicates the input channel to be read and the interrupt enable bits.
Address:
Type:
Word Size: 8-bit
Bit Map:
7
6
SCANEN*
CNTINTEN
Bit
7
PC-LPM-16/PnP User Manual
Base address + 00 (hex)
Write-only
5
4
EXTINTEN
FIFOINTEN
Name
Description
SCANEN*
Scan Enable Bit—This bit enables or disables
multichannel scanning during data acquisition. The
power-on value is 1. If this bit is cleared, analog
channels MA<3..0> through 0 are sampled
alternately. If this bit is set, a single analog channel
selected by MA<3..0> is sampled during the entire
data acquisition operation. In order to perform single-
channel sampling, the UP/DOWN bit in Command
Register 2 must be clear before setting SCANEN* to
1. To set up a scanning mode, two consecutive
writings of this register are necessary. First, write the
desired valve to the UP/DOWN bit in Command
Register 2 if the UP/DOWN bit is not currently set to
its proper value. Then write MA<3..0> with
SCANEN* set to load the scan counter. Then write
MA<3..0> with SCANEN* cleared to enable
scanning.
For example, if the UP/DOWN bit is 0 and MA<3..0>
is 0011 and SCANEN* is first set, then cleared, analog
input channels 3 through 0 are sampled alternately
during subsequent data conversions. If SCANEN* is
set and is not cleared (with MA<3..0> still set to
0011), only analog input channel 3 is sampled during
the subsequent data conversions.
See the Programming Multiple A/D Conversions with
Channel Scanning section later in this appendix for
more information.
3
2
MA3
MA2
D-4
1
0
MA1
MA0
National Instruments Corporation

Advertisement

Table of Contents
loading

Table of Contents