Hi,
I need driver software for temperature sensor (kl46 microcontroller).. can any one help me please..
Solved! Go to Solution.
If you mean the on-chip sensor, you may get some benefit from this thread:
If you mean the on-chip sensor, you may get some benefit from this thread:
Hi Earl,
The link was useful. But I still have a doubt that for Vdd = 3.3V can i use the value of Vtemp25 that is specified in electrical characteristics.
Thank you!
Vtemp25, and the associated slope, are developed from a specific variation of an internal bandgap, and as such are absolutes, irrespective of VDD or VrefH. A great deal of the confusion in AN3031 is the efforts therein to think only in terms of AtoD conversion step sizes and how those come from the AtoD reference voltage, often VDD. That is of course what the AtoD 'answer' represents, but it is better to let your math 'dispense' with that element of the process and keep your code working in the 'absolute' domain.
AN3031 is 'particularly confusing' in its attempts to relate everything to AtoD counts. Granted, at some point 'every measurement is a set of AtoD counts', but there is little point to dragging that metric thru all subsequent calculations. Take the basic measurements in Figure 1, and let's just use 0C as our point: From VDD=3.6V we get about 210 counts, and 210/1024*3.6=0.738V. Dropping all the way to 1.9V nets 400 counts, and 400/1024*1.9=0.742V -- well within 'graph approximation' error to the SAME actual measured voltage for 0C (as opposed to 25C, which is about 200 counts at 3.6V or 0.703V for this example chart). It is like AN3031 is 'going out of their way' to make this measurement confusing...
If we change the measurement-conversion-result to mV, then 'Equation 1' can be applied directly using the mV values directly from the part datasheet. My only change to Equation 1 is that instead of dividing by 0.001715V for the slope, I multiply by the inverse (583) -- better all around. And mV returns mC.
Hi shabana m,
I want to know which temperature sensor do you used, we don't have the demo code of this now, maybe you should according to the user manual of temperature sensor, make sure how to communicate, then
according to our demo code of KL46 to write your own code, you can download our demo code of KL46 from this link:
if you meet the problem when you write your own code, you can contact us!
I wish it helps you!
Best regards
Jing
hi Jingjing,
Actually i am using on-chip temperature sensor. there is no code for temperature sensor in the link that you have sent. But the link was useful. Thank you!