
APPLICATION
2.5 A-D converter
2-62
3802 GROUP USER’S MANUAL
2.5.3 A-D conversion application example
Conversion of Analog input voltage
Outline :
The analog input voltage input from the sensor is converted into digital values.
Figure 2.5.6 shows a connection diagram, and Figure 2.5.7 shows a setting of related registers.
Fig. 2.5.6 Connection diagram [Conversion of Analog input voltage]
Specifications :
The analog input voltage input from the sensor is converted into digital values.
The P6
0
/AN
0
pin is used as an analog input pin.
Fig. 2.5.7 Setting of related registers [Conversion of Analog input voltage]
P6
0
/AN
0
3802 group
Sensor
AA
0
Analog input pin selection bits : Select the P6
0
/AN
0
pin
AD conversion completion bit : Conversion in progress
ADCON
AD/DA control register (Address : 34
16
)
b7
0
0
0
Store a result of A-D conversion (
Note
)
AD
A-D conversion register (Address : 35
16
)
b7
(read-only)
Note:
Read out a result of A-D conversion after bit 3 of the
AD/DA control register (ADCON) is set to “1.”
b0
b0