b.p.m.
05-23-2008, 08:54 AM
Hey All
I've recently been fooling around with Larry Freeze's great little ADC0831_LM34 spin program. I learned quite a bit about the basics of the interface and the FullDuplexSerial
object.
I noticed one weird thing though. No matter how hot the sensor got the output
maxxed out at 127 (maxium 7 bit resolution). I tried boiling water. Dang it, I held a lighter a couple inches below the sensor and it still maxxed at 127 F. It struck me that somehow
the LSB was not loading. So, on a hunch, I changed the REPEAT 8 to REPEAT 9 and it worked.
After recalibrating the Vref pot to a known temperature (ie. room, ice, etc.) it now
maxxed out at 255 (the full 8 bit resolution of the ADC). Why this worked I'm not totally sure. It may have to do with the falling trigger of the Chip Select line and timing of the INA.
When I have the patience I'll peruse the data sheet in depth and figure it out. For now I kluged it and I'm rigging up a probe so I can take the temperature of everything in sight.
blake
Edit: Also change Lm34temp from byte to word or long in var section.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Can't sleep, clown will eat me."
Bart Simpson
Post Edited (b.p.m.) : 5/23/2008 2:24:53 AM GMT
I've recently been fooling around with Larry Freeze's great little ADC0831_LM34 spin program. I learned quite a bit about the basics of the interface and the FullDuplexSerial
object.
I noticed one weird thing though. No matter how hot the sensor got the output
maxxed out at 127 (maxium 7 bit resolution). I tried boiling water. Dang it, I held a lighter a couple inches below the sensor and it still maxxed at 127 F. It struck me that somehow
the LSB was not loading. So, on a hunch, I changed the REPEAT 8 to REPEAT 9 and it worked.
After recalibrating the Vref pot to a known temperature (ie. room, ice, etc.) it now
maxxed out at 255 (the full 8 bit resolution of the ADC). Why this worked I'm not totally sure. It may have to do with the falling trigger of the Chip Select line and timing of the INA.
When I have the patience I'll peruse the data sheet in depth and figure it out. For now I kluged it and I'm rigging up a probe so I can take the temperature of everything in sight.
blake
Edit: Also change Lm34temp from byte to word or long in var section.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Can't sleep, clown will eat me."
Bart Simpson
Post Edited (b.p.m.) : 5/23/2008 2:24:53 AM GMT