Rf22 – Rainbow Electronics RF22 User Manual
Page 36

RF22
Version: 0.1 Date: 12/23/2008
Tel: +86-755-82973805 Fax: +86-755-82973550 E-mail: [email protected] http://www.hoperf.com
36
The internal 8 bit ADC input source can be selected as follows:
000: Internal Temperature Sensor
001: GPIO0, single-ended
010: GPIO1, single-ended
011: GPIO2, single-ended
100: GPIO0(+) – GPIO1(–), differential
101: GPIO1(+) – GPIO2(–), differential
110: GPIO0(+) – GPIO2(–), differential
111: GND
3:2
adcref[1:0]
ADC Reference Voltage Selection.
The reference voltage of the internal 8 bit ADC can be selected as follows:
0X: bandgap voltage (1.2V)
10: VDD / 3
11: VDD / 2
1:0
adcgain[1:0]
ADC Sensor Amplifier Gain Selection.
8.3.1. ADC Differential Input Mode—Bridge Sensor Example
The differential input mode of ADC8 is designed to directly interface any bridge-type sensor, which is demonstrated in
the figure below. As seen in the figure the use of the ADC in this configuration will utilize two GPIO pins. The supply
source of the bridge and chip should be the same to eliminate the measuring error caused by battery discharging. For
proper operation one of the VDD dependent references (VDD/2 or VDD/3) should be selected for the reference voltage
of ADC8. VDD/2 reference should be selected for VDD lower than 2.7 V, VDD/3 reference should be selected for VDD
higher than 2.7 V. The differential input mode supports programmable gain to match the input range of ADC8 to the
characteristic of the sensor and VDD proportional programmable offset adjustment to compensate the offset of the
sensor.
GPIO2
GPIO1
VDD
GND
Digital I/O
measure control
RF22
Microcontroller
+ -
GND
Figure24. ADC Differential Input Example—Bridge Sensor
The adcgain[1:0] bits in "Register 0Eh. I/O Port Configuration" determine the gain of the differential/single ended
amplifier. This is used to fit the input range of the ADC8 to bridge sensors having different sensitivity:
Differential Gain
adcgain[1]
adcgain[0]
adcref[0] = 0
adcref[0] = 1
Input Range (% of VDD)
0
0
22/13
33/13
16.7
0
1
44/13
66/13
8.4
1
0
66/13
99/13
5.6
1
1
88/13
132/13
4.2
Note: The input range is the differential voltage measured between the selected GPIO pins corresponding to the full ADC range
(255).