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.

Interfacing LMT84 with MSP430g2332

Other Parts Discussed in Thread: LMT84, MSP430G2332

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;
}

**Attention** This is a public forum