User Manual
GD32450I-EVAL
21
/
51
5.7
ADC_Temperature_Vrefint_Vbat
5.7.1
DEMO Purpose
This demo includes the following functions of GD32 MCU:
Learn to use the ADC to convert analog signal to digital data
Learn to get the value of inner channel 16(temperature sensor channel), channel 17
(VREFINT channel) and channel 18(VBAT/4 channel)
5.7.2
DEMO Running Result
Jump the JP5 to USART with the jumper cap, and then download the program
<07_ADC_Temperature_Vrefint_Vbat> to the GD32450I-EVAL board. Connect serial
cable to EVAL_COM1, open the HyperTerminal.
When the program is running, HyperTerminal display the value of temperature, internal
voltage reference (V
REFINT
)
and external battery voltage V
BAT
.
Notice: because there is an offset, when inner temperature sensor is used to detect
accurate temperature, an external temperature sensor part should be used to calibrate
the offset error.