AnsweredAssumed Answered

LPC11U68 - internal temperature sensor

Question asked by johanntaferl on Feb 17, 2017
Latest reply on Feb 21, 2017 by Kerry Zhou

Hello all,

 

since I have no luck in another thread (https://community.nxp.com/message/764698), I want to ask my question in a different way.

 

I do use an LPC11U68 on an Xpresso V2 Rev C

The data sheet and manuals say that there is an 12bit ADC.

The internal temperature sensor is connected to channel 0 when powered up.

The sensor measures the temperature inverse to the ADC value.

The temperature range is from -40 to 105°C.

 

I get a raw ADC value of about 650.

So I calculate:

const constexpr std::int32_t maxRawValue = 4095; //12bit ADC
const constexpr std::int32_t temperatureRange = 145;
const constexpr std::int32_t temperatureOffset = 40;

const std::int32_t rawValue = getRawValue();
const std::int32_t invertedRawValue = maxRawValue - rawValue;
const std::int32_t result = (invertedRawValue * temperatureRange / maxRawValue) - temperatureOffset;

 

My result is than -17.

When I use some coolant spray, the rawValue will not change much.

Does anybody have some suggestions what I could do wrong?

 

Thanks a lot!

 

PS: I get correct ADC values when I turn off the internal temperature sensor and do connect a potentiometer.

Outcomes