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.

TMP61-Q1: What does " return THRM_TEMP * 32; // multiply by 32 for GC to divide later" in code

Part Number: TMP61-Q1

In thermistor.c there is code that ends with "// multiply by 32 for GC to divide later" in code"

which I suspect is unnecessary to get degrees C, and something don by whatever GC is?

float thermistor_calc_temperature(int raw_ADC)
{
    // THRM calculations via regression
    // Copied from TI Thermistor Design Tool Excel Doc
    VTEMP          = 0.0;
    float THRM_ADC = raw_ADC;

    float THRM_A0 = -4.232811E+02;
    float THRM_A1 = 4.728797E+02;
    float THRM_A2 = -1.988841E+02;
    float THRM_A3 = 4.869521E+01;
    float THRM_A4 = -1.158754E+00;

    VTEMP =
        (VBias / ADC_BITS) *
        THRM_ADC;  // calculate volts per bit then multiply that times the ADV value
    THRM_TEMP = (THRM_A4 * powf(VTEMP, 4)) + (THRM_A3 * powf(VTEMP, 3)) +
                (THRM_A2 * powf(VTEMP, 2)) + (THRM_A1 * VTEMP) +
                THRM_A0;    // 4th order regression to get temperature
    return THRM_TEMP * 32;  // multiply by 32 for GC to divide later
}