# The usage of ADC0 internal channels

Question asked by jeffcharles on Dec 18, 2017
Latest reply on Dec 20, 2017 by Diana Batrlova

Hi,

We can select the analog input channel of ADC0 about s9s12zvl, the screenshots in the attachment is about the usage of ADC0 internal channels. I try to use the four internal channels, please see my configuration code in the attachment. The result is that:

1. Internal_0 (ADC temperature sensor)      => the adc result is 0x110(272 D)

2. Internal_1(Bandgap Voltage VBG or Chip temperature sensor VHT)      => the adc result is 0x7b(123 D)

3. Internal_4(BATS Vsup sensor voltage)      => the adc result is 0x0

4. Internal_5(High Voltage input Port L0)      => the adc result please see the attachment

My problems are that:

1)  What is the difference between ADC temperature sensor and chip temperature sensor?

2)  I can find the calculation formula about CPMUHTCTL like this:

VHT(temp) = VHT(150) - (150 - temp) * dVHT = 2.4V - (150-temp) * 5.25(typical value) mV/℃

VHT(temp) = 123/1023*5 = 601.17mV

601.17mV = 2400mV - (150 - temp) * 5.25mV/℃

=> temp = -192.63℃

The calculation result is unbelievable, is there anyting wrong with my configuration?

3)  Does the calculation formula applicated for ADC temperature sensor too?

4)  From the result we can see the it does not work about internal_4, does BATS sensor need additional configuration?

5)  You can see the HVI0 test result in the attachment:

The result is accurate in the range of 7V and 23V, but it is almost unchanged over the 23V. It means that in order to ensure the measurement accuracy, the measured voltage should be less than 23V?

Best regards,

Jeff