www.geehy.com Page 312
24.3
Functional Description
ADC Pin and Internal Signal
Table 82 ADC Internal Signal
Name
Instruction
Signal type
TMRx_TRG
Internal information from timer
Input
V
SENSE
Output voltage of internal temperature sensor
Input
V
REFINT
Output of internal reference voltage
Input
Table 83 ADC Pins
Name
Instruction
Signal type
V
DDA
Analog power supply, positive ADC reference
voltage, V
DDA
≥
V
DD
Input, analog power supply
V
SSA
Analog ground, V
SSA
=V
SS
Input, analog power ground
ADC_IN[15:0]
16 channels analog inputs
Analog input signal
Calibration
The function of calibration is to eliminate the offset error of A/D conversion of
each chip, so calibration should be conducted before A/D conversion, and ADC
module cannot be used during calibration.
Calibration configuration process:
Configure ADCEN bit of register ADC_CTRL to 0, and disable ADC
Configure CAL bit of register ADC_CTRL to 1, and enable calibration
After calibration is completed, CAL bit is automatically cleared by
hardware
The calibration factor is read in CDATA[6:0] bit of register ADC_DATA
ADC Conversion Mode
24.3.3.1
Single conversion mode
In this mode, for single channel, only one conversion is performed for this
channel, and for multiple channels, only one conversion is performed for this
group of channels .
When CMODESEL bit of configuration register ADC_CFG1 is 0, ADC is set to
single conversion mode; ADC conversion can be enabled by setting STARTCEN
bit of configuration register ADC_CTRL to 1 by software or by trigger event of
hardware.
After the conversion of each channel, the converted data will be stored in the
16-bit ADC_DATA register, EOCFLG bit will be set to 1, and if EOCIEN bit is set
to 1, an interrupt will be generated. After the channel sequence conversion,
EOSEQFLG bit will be set to 1, and if EOSEQIEN bit is set to 1, an interrupt will
be generated.
24.3.3.2
Continuous conversion mode
In this mode, for single channel, continuous conversion is only conducted for this
channel; for multiple channels, continuous conversion is only conducted for this