Download AD3300/ADA3300 User`s Manual

Transcript
The program sequence for programming the channel and gain not using the channel-gain scan memory is:
1. Set bits 1 and 0 at BA + 2 to 00 (this points BA + 4 to the channel/gain latch).
2. Write the channel and gain data to be loaded to BA + 4.
Before Starting Conversions: Programming the Channel-Gain Table
The channel-gain scan memory can be programmed with 1024 24-bit entries in tabular format. Sixteen bits
contain the A/D channel-gain data, and 8 bits contain digital control data to support complex channel-gain
sequences. To load a new channel-gain table, first clear the channel gain table by writing and reading at BA + 0.
To add entries to an existing table, simply write to the A/D Table (and Digital Table if used) as described in the
following paragraphs. Note that writing beyond the end of the table is ignored.
16-Bit A/D Table
The A/D portion of the channel-gain table with the channel, gain, input range, input type, pause and skip bit
information is programmed into the channel-gain scan memory using the A/D Table Register at BA + 4. This
register is defined below. To load channel and gain data into the A/D table, first set bits 1 and 0 at BA + 2 to 01.
This points BA + 4 to write to the A/D table. Now you can write the 16-bit channel/gain word to BA + 4. If you
have cleared the existing table, the first word written will be placed in the first entry of the table, the second word
will be placed in the second entry, and so on. If you are adding to an existing table, the new data written will be
added at the end.
D15 D14 D13 D12 D11 D10
0
0
0
D9
D8
D7
D6
D5
D4
D3
D2
D1
D0
0
Skip Bit
0 = disabled
1 = enabled
Pause Bit
0 = disabled
1 = enabled
A/D SE/DIFF
0 = single-ended
1 = differential
Gain Select
000 = x 1
001 = x 2
010 = x 4
011 = x 8
100 = x 16
101 = x 32
110 = x 64
111 = x 128
A/D Input Range/
Polarity Select
00 = ±5 volts
01 = ±10 volts
10 = 0 to +10 volts
11 = Reserved
Analog Input
Channel Select
0000 = channel 1
0001 = channel 2
0010 = channel 3
0011 = channel 4
0100 = channel 5
0101 = channel 6
0110 = channel 7
0111 = channel 8
1000 = channel 9
1001 = channel 10
1010 = channel 11
1011 = channel 12
1100 = channel 13
1101 = channel 14
1110 = channel 15
1111 = channel 16
Channel Select, Gain Select, Input Range and Input Type
The channel number, gain value, input range and input type are entered in the table using bits 0 through 9.
Each of these parameters can be set independently for every entry in the table. This allows you to set up a complex array of sampling sequences mixing channels, gains, input ranges and input types. Care must be taken in
selecting the proper input type. The board is capable of 16 single-ended inputs or 8 differential inputs. You can
select combinations of single-ended and differential but each differential channel actually uses 2 single-ended
channels. If you select channel 1 to be a differential channel, you must connect your signal to AIN1+ (P3-1) and
AIN1- (P3-2). Channel 8 now is not available as a single-ended channel.
5-4