www
.mcu.com.cn
209
/
239
Rev.
1.00
CMS80F731x Reference Manual
23.2 ADC Configuration
When configuring and using an ADC, the following factors must be considered:
⚫
Port configuration.
⚫
Channel selection.
⚫
ADC converts the clock source.
⚫
Interrupt control.
⚫
The format in which the results are stored.
23.2.1
Port Configuration
ADC can convert both analog and digital signals. When converting an analog signal, the corresponding port needs to be
configured as an analog port.
Note: Applying an analog voltage to a pin defined as a digital input may cause an overcurrent in the input buffer.
23.2.2
Channel Selection
The register ADCCHS bit determines which channel is connected to the analog-to-digital converter.
If you change the channel, you will need a delay before the next conversion starts. The ADC delay time is shown in the
following table:
Delay time
Operating voltage
500ns
2.5~4.5V
200ns
4.5~5.5V
23.2.3
ADC Reference Voltage
The reference voltage for the ADC is provided by default by the chip's VDD or by the internal ADC-LDO. The ADC-LDO can
choose from four voltage outputs: 1.2V/2.0V/2.4V/3.0V.