mc9s12p bandgap and temp sensor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mc9s12p bandgap and temp sensor

963 Views
tom_tom_tgreive
Contributor II

I am trying to write software using the internal temp. sensor and voltage ref.  I am able to read the result, but does anyone know what a/d out should be for a given temp?  Or what the band gap reference voltage will be?  The only spec I can find is the temp sensor slope is 4.0-6.5 mV/deg C.  Does that mean 0 deg C = 0 mV?  I'm operating at 5V.

 

thanks

Labels (1)
0 Kudos
2 Replies

357 Views
kef
Specialist I

No, you won't read 0 at 0degC. 5mV/degC is just a slope. This meant that if you read 2000mV at 40C, you will read 2005mV at 41C.

S12P documentation seems being incomplete. I also can't find bandgap voltage and what should be sensor voltage at say 25degC. For S08 devices it all is specified, even temperature formula is given. You can calibrate temp sensor of course, but I think specs should provide not only typical figures but also min and max, which you can't find easily. I think you should create new Serivce Request.

 

If your supply voltage and or ATD Vref is stable and known, then you you don't need to read bandgap voltage reference for reading temp sensor or other voltages . Bandgap is useful for battery powered applications, when supply voltage (and ATD voltage reference) can float between specified VDD35 limits (3.13V and 5V for S12P). Then reading known bandgap voltage reference (while ATD Vref is unknown), you can calculate what is current ATD Vref. For example S08DZ128 bandgap voltage is about 1.2V. At 10bit resolution and with 5V ATD Vref, you should read from bandgap voltage ATD channel 1.2V/5V * 2^10 = ~246. When Vref drops to 4V, you should read ~307 etc. You read bandgap, calculate Vref and have idea about absolute voltage values on other ATD channels.

 

0 Kudos

357 Views
tom_tom_tgreive
Contributor II

Thank you for your reply kef,

I went down the service request rout.  My reply for the Vbg was:

"The targeted value of band gap voltage which was also confirmed in characterization was 1.21V. Small variations may exist."

and for the temp sensor:

http://www.freescale.com/files/microcontrollers/doc/app_note/AN3624.pdf

 

Apparently the s12p temp sensor circuit is the same for the s12x.  The PDF is okay, but not very specific.  They seem to want a calibration step.

In truth I'm more interested in the reference then the temp sensor anyway

 

tom

 

0 Kudos