AdcRegs.ADCTRL1.bit.ACQ_PS = ADC_SHCLK;
AdcRegs.ADCTRL3.bit.ADCCLKPS = ADC_CKPS;
AdcRegs.ADCTRL1.bit.SEQ_CASC = 1; // 1 Cascaded mode
AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0x0;
AdcRegs.ADCTRL1.bit.CONT_RUN = 1; // Setup con
tinuous run
AdcRegs.ADCTRL1.bit.SEQ_OVRD = 1; // Enable Sequencer override feature
AdcRegs.ADCCHSELSEQ1.all = 0x1; // Initialize all ADC channel selects to A0
AdcRegs.ADCMAXCONV.bit.MAX_CONV1 = 0x1; // convert and store in 8 results registers
各位大神,小弟是初学者,这是例程给的AD采集通道是A0,我尝试着改成A1,上面AdcRegs.ADCCHSELSEQ1.bit.CONV001= 0x1;改了又改,发现一直是A0通道采集,我是哪里
理解错了?
还有SampleTable1[array_index++]= ( (AdcRegs.ADCRESULT1)>>4);
AdcRegs.ADCRESULT0改成AdcRegs.ADCRESULT1还是现实A0通道采集,怎么回事?
指点一下,谢谢!
一周热门 更多>