I've got an adc reading giving me a value of 20.4 deg C. How can I get 20.4x?
Ive tried //100 but that just gives me 20.44 where the numbers after the decimal are always the same, ie 20.11 or 20.55 etc etc.
I've got an adc reading giving me a value of 20.4 deg C. How can I get 20.4x?
Ive tried //100 but that just gives me 20.44 where the numbers after the decimal are always the same, ie 20.11 or 20.55 etc etc.
There are a couple of ways. One is to use the DIG command to extract the numbers. Another way would be to use the /(divide) and //(modulus) functions.
So, you print (number /100)
print decimal point
print (number // 100)
I do not have a handy example to show you.
I tried the DIG command earlier and I got an odd character.
Interestingly, with a 8.0V source, I'm getting a reading of 15.4V. I'll have to do some further testing.
Meanwhile, any good Math for a thermistor?
Also make certain that you have an adequate acquisition time. The ADC is most accurate when the source impedance is < 2K ohms. With a 10 K source, you will need an acquisition time of 11uSec or greater.
Charles Linquist
Thanks Charles. I have had this set to 50uS right from the start. All my ADC channels are working very well.
How accurate do you need you 3V? A 100K and 10 K don't make a 10:1 ratio.
Ohms Law RTotal/ Rx (in this case 10K)
110K / 10K is a ratio of 11:1
So dropping 30V across 110K will give 27.27V across the 100K and 2.73V across the 10K
aajgss
Bookmarks