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 ADC problems

Other Parts Discussed in Thread: CC2430, TIMAC

Hello,

 

We have a small design using the cc2430.  It is almost fully functional, Only the ADC remains a problem

 

We are using only the P0_0 line for input so

ADCCFG = 0x01;

we are using only a single conversion so

ADCCON3 = 0x80;

I hope I have the DMA off and all clocks on and I monitor ADCL and ADCH  for any change. 

 irrespective of any input the valuse are always the same

 

 

 

  • This is what I'm using:

    // From ioCCxx10_bitdef.h

    SFR(  ADCCON3   ,  0xB6  )      /*  ADC Control 3  
    SFR(  ADCH          ,  0xBB  )      /*  ADC Data High

    #define ADCCON3_ECH_AIN0                  (0x00)
    #define ADCCON3_EDIV_64                     (0x00 << 4)
    #define ADCCON3_EREF_AVDD              (0x02 << 6)


    //Configure ADC
       
        ADCCON3 = ADCCON3_EREF_AVDD | ADCCON3_EDIV_64 | ADCCON3_ECH_AIN0;
        your_variable = ADCH;

    //Code

        ADCCON3 = ADCCON3 | ADCCON3_ECH_AIN0;
        your_variable = ADCH;

     

  • Thanks, but this gives the same problem.  are there configuration isssues of which I may not be aware?

  • Hi,

    I'm facing some problem at the configuring the PORT0 as tristate to read the ADC data ,

    P0INP=0xFF;  I'm using this to make PORT0 to make tristate .

    but only P0.0 is working fine and other pins are behaving something differently , they read different values at the ADC.

    I'm using TIMAC and CC2430 EM and putting this in SmartRF04 evaluation board .

    PODIR=0x00; //making i/p

    P0INP=0x00;// selecting pull up/pull down

    P2INP=0x20; // making port0 as  pull down

    Even I had tried for pulling down the pins here also only PIN P0.0 shows zero volt and other pins are still high.

    why this port is behaving like this..?  

    Is that configuration problem..?

    regards

    Chethan.k.p

  • I have the same problem with Chethan kp. :(

    Can some one help me?