User Manual
GD32450I-EVAL
23
/
51
5.9
ADC0_ADC1_Regular_Parallel_mode
5.9.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 use ADC0 and ADC1 regular parallel mode
5.9.2
DEMO Running Result
Jump the JP5 to USART with the jumper cap, and then download the program
<09_ADC0_ADC1_Regular_Parallel_mode> to the GD32450I-EVAL board. Connect
serial cable to EVAL_COM1, open the HyperTerminal. PC5 pin connect to the external
voltage input. PC3 is the output voltage of the slide rheostat VR1 on board. Keep PC5
pin should not be reused by other peripherals. JP17 should not be connected.
TIMER1_CH1 is the trigger source of ADC0 and ADC1. When the rising edge of
TIMER1_CH1 coming, ADC0 and ADC1 convert the regular channel group parallelly.
The values of ADC0 and ADC1 are transmitted to array adc_value[0] and adc_value [1]
by DMA.
When the first rising edge of TIMER1_CH1 coming, the value of the ADC0 conversion of
PC3 pin is stored into the low half word of adc_value [0], the value of the ADC1
conversion of PC5 pin is stored into the high half word of adc_value [0]. When the
second rising edge of TIMER1_CH1 coming, the value of the ADC0 conversion of PC5
pin is stored into the low half word of adc_value [1], the value of the ADC1 conversion of
PC3 pin is stored into the high half word of adc_value [1].
When the program is running, HyperTerminal displays the regular value of ADC0 and