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.

CC2540 ADC

Other Parts Discussed in Thread: CC2540

TI的工程师们,问下CC2540的adc在使用时,IO口要配置哪些寄存器,要不要配置成三态?

  • unsigned int   adc_result;

     APCFG=0x80;///adc=p0.7

    ADCCON1=0x33;

    ADCCON3=0x37;///内部参考电压 单通道 12位 实际效果为11位!!!!!!!!!!!

     ADCCON1 |= 0x40;///start adc  

      while( !(ADCCON1 & ADCCON1_EOC));///等待转换完成

    adc_result = (ADCL >> 4);   

     adc_result |= (ADCH << 4);