Hello
i want to interface the LMT84 temperature sensor with an MSP430G ( i use MSP430G2332).
I know, that i can make it with an ADC but my values are wrong. Here to understand i poste my code.
Have somebody successfully interface this temperature sensor?
int adc_read(unsigned int channel) { ADC10CTL0 = SREF_1 | ADC10SHT_3 | REFON | ADC10ON | ADC10IE; //ADC10CTL0 = ADC10ON | ADC10SHT_3 + SREF_1 + REFON; ADC10CTL1 =ADC10DIV_3 + channel; // INCH_2 ADC10CTL0 |= ENC + ADC10SC; while(1){ if ((ADC10CTL1 ^ ADC10BUSY) & ((ADC10CTL0 & ADC10IFG)==ADC10IFG)) { ADC10CTL0 &= ~(ADC10IFG + ENC); break; } } ADC10CTL0 &= ~ENC; return ADC10MEM; }