INPUT RANGE
RESOLUTION
ADBU
G1
G0
+/- 10 V
305 uV
0
0
0
+/- 5 V
153 uV
0
0
1
+/- 2.5 V
76 uV
0
1
0
+/- 1.25 V
38 uV
0
1
1
0 - 10 V
153 uV
1
0
0
0 - 5 V
76 uV
1
0
1
0 - 2.5 V
38 uV
1
1
0
0 - 1.25 V
19 uV
1
1
1
The ADC data range is –32768
10
to 32767
10
for each of the input ranges listed below.
See the software example in the ADC Data Register section earlier in this chapter.
The gain setting is the ratio between the ADC full-scale range and the effective input signal range. For example, if the ADC
full-scale range is 0-10V, a gain setting of 2 creates an input signal range of 0-5V, and gain setting of 4 creates an input range of
0-2.5V.
See Also
Register Summary ( see page 41)
BANKING BETWEEN 8254 AND THE INDEXED REGISTER ARRAY
/*****************************************************************
/ SET BANK 8254/INDEXED-ARRAY
/
/ Call this function when changing from one bank to another. Recommend only
/ changing the bank when one read/writes to the 8254, since that is likely to
/ be read/written to the least amount compared to the indexed register array.
/
/ Alternatively, one could check the RB bit each time an indexed register
/ is read or written; it will then take longer on average to read/write registers.
*/
void
STX104_Set_Bank(
int
board,
char
bank )
{
unsigned
char
scratch;
unsigned
char
value;
unsigned
int
address;
address = stx104_base_address[board] + STX104_ADC_CONFIGURATION;
scratch = inp( address );
if
( bank == 0 )
/* request banking to the 8254 */
{
/* test for RB bit in ADC configuration register */
if
( (scratch & 0x80) == 0x80 )
{
scratch = scratch & 0x0F;
value = scratch | 0x30;
outp( address, value );
value = scratch | 0x30;
outp( address, value );
value = scratch | 0xB0;
outp( address, value );
value = scratch | 0xA0;
outp( address, value );
}
STX104 Reference Manual
11.20 ADC Configuration (Offset=11)
Copyright © 2009 by
Apex Embedded Systems
. All rights reserved.
70
Thursday, October 08, 2009
11
Содержание STX104
Страница 1: ......
Страница 8: ......
Страница 10: ......
Страница 12: ......
Страница 16: ......
Страница 18: ......
Страница 20: ......
Страница 22: ......
Страница 42: ......
Страница 44: ......
Страница 116: ......
Страница 122: ......
Страница 124: ...STX104 Reference Manual 15 Copyright 2009 by Apex Embedded Systems All rights reserved 116 Thursday October 08 2009 15 ...
Страница 126: ......
Страница 128: ......
Страница 132: ......