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.

CC1110 temperature sensor



Good Afternoon,

 

I'm currently using the CC1110, and I'm trying to use the temperature sensor embedded in the circuit. 

I'm able to obtain a readding from the sensor through the ADC (7bit), and using the table provided in the datasheet I get the temperature, but this temperature has a lot of fluctuations (more than 10°C).

Has any one implemented the temperature sensor? If so, what equation do you recomend in transforming the 7bit voltage to a temperature?

 

Thank you.

  • This post is old, but here is what I use based on DN102 (SWRA101A):

    /* Temperature sensor variables and constants */
    #define tConst 0.61065 // (1250/2047)
    #define tCoeff 2.54 // coefficient from datasheet
    static __xdata float tOutputV;
    static __xdata uint16 tADCResult;
    static __xdata float tResultC;

    /* Temperature sensor constants offset */
    #define tOffset 773 //(temperatareOutputAtZeroDegC + temperatureOffsetAt24DegC)

    do{
    // Set [ADCCON2.SREF/SDIV/SCH] bits according to ADC configuration */
    ADCCON2 = (ADCCON2_SREF_1_25V | ADCCON2_SDIV_512 | ADCCON2_SCH_TEMPR);

    // Set [ADCCON1.ST/STSEL] bits according to ADC configuration and start converstion*/
    ADCCON1 = (ADCCON1_ST | ADCCON1_STSEL);

    while(!(ADCCON1 & 0x80));

    tADCResult = ADCL;
    tADCResult |= (((unsigned int)ADCH) << 8);
    } while(0);

    // Conversion result located in MSB section of ADCH:ADCL
    tADCResult >>= 4; // Shift 4 due to 12 bits resolution

    tOutputV = tADCResult * tConst;

    tResultC = (tOutputV - tOffset)/tCoeff;

    tResultF = (uint16)((tResultC*9/5)+32);