This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2430自带AD的多通道采集

Other Parts Discussed in Thread: CC2430

CC2430自带AD怎样实现多通道采集,我如下配置能实现吗,

 ADCCFG = 0x81; 

ADC_SEQUENCE_CONVERSION(ADC_REF_AVDD | ADC_14_BIT | ADC_AIN7);    
  ADC_STOP();                            //设置ADC转化的触发方式为手动
  ADC_START();                           //启动ADC转化  
  while(!ADC_SAMPLE_READY());            //等待转化完成  
  channel = ADCCON2 & 0x07;     //读转换通道
  temp[channel] = ADCL >> 2;                     

temp[channel] |= (((unsigned int) ADCH) << 6);  //将转化结果存入对应的通道temp中

  
  potVoltage[channel] = scaleValue(temp[channel]);               //将转换通道的数据转换成电压     
  updateVoltageLCD(potVoltage[channel], temp[channel],channel);  //显示在0列、channel行