Have you considered the MCP9700 temp sensor from Microchip.
About to use one on a project myself, Cheap £0.22 @10off in farnell and hopefuly a lot less coding than a Thermistor.
Have you considered the MCP9700 temp sensor from Microchip.
About to use one on a project myself, Cheap £0.22 @10off in farnell and hopefuly a lot less coding than a Thermistor.
Thanks guys for posting.
That helped me understand the lookup table.
Would it be faster and take up less code if I placed the table inside of an eeprom. Also to get the resolution I want over the temp. range I want, I think I am going to switch to a mcp 3202 12bit ad chip.
Another question for ya all. If I am reading a temp of 70.8 is it possible to store that in a 1 byte memory location. How I handle this now is to put the 70 in the high byte of a word variable and I put the .8 in the low byte.This works very well but doubles the memory requirments.
Thanks to You all
Nick
A correction to my not so good example
" If Index is zero, Var is set to the first Value."Code:'Lets say TXI = 0 GOSUB D_INDEX ' Now TXIU will hold the value 2500
Faster-- No, it takes time to read the EEPROM. Less code-- Probably yes.Would it be faster and take up less code if I placed the table inside of an eeprom.
Not that I can think of.If I am reading a temp of 70.8 is it possible to store that in a 1 byte memory location.
Dave
Always wear safety glasses while programming.
Storing 1024 WORD values in LOOKUP2 statements would take over 8K words of program space.
But using the technique described here ... http://www.picbasic.co.uk/forum/show...php?t=3891#LAB
You can do it with just over 1K.
Faster, smaller, no external parts.
DT
Bookmarks