The signals on the Port 0 pins can be used as ADC inputs. In the following, these port pins are referred to as the AIN0–AIN7 pins. The input pins AIN0–AIN7 are connected to the ADC.
The ADCCON2.SCH(用于定义转换序列) register bits are used to define an ADC conversion sequence from the ADC inputs.
If ADCCON2.SCH is set to a value less than 8, the conversion sequence contains a conversion from each channel from 0 up to and including the channel number programmed in ADCCON2.SCH.(当设置该寄存器值小于8时,转换序列为从通道0到SCH定义的值,包括该值)
When ADCCON2.SCH is set to a value between 8 and 12, the sequence consists of differential inputs, starting at channel 8 and ending at the programmed channel.(在8~12之间,为缠粉输入,通道从8到定义的值)
For ADCCON2.SCH greater than or equal to 12, the sequence consists of the selected channel only.(如果大于12,则定义哪个就是哪个)
In addition to this sequence of conversions, the ADC can be programmed to perform a single conversion from any channel(ADC能够配置从任何一个channel开执行一次单通道转换). Such a conversion is triggered by writing to the ADCCON3 register. (转换开始的条件->)The conversion starts immediately unless a conversion sequence is already ongoing, in which case the single conversion is performed as soon as that sequence is finished.
There is one DMA trigger for each of the eight channels defined by the first eight possible settings for ADCCON2.SCH。当通道中一个新的样本准备转换,DMA 触发是活动的。The DMA triggers are named ADC_CHsd in Following Table, where s is single-ended channel and d is differential channel。
In addition, one DMA trigger, ADC_CHALL, is active when new data is ready from any of the channels in the ADC conversion sequence.