On Mon, 13 Mar 1995, James L. Johnson wrote: > Hello, > I am going to try to implement the solution to the Steinhart-Hart > equation using a PIC. This equation gives the relationship between > the resistance of a negative-temperature-coefficient thermistor and > its temperature. It is an empirically determined equation, so is > only an approximation to the relationship between resistance and > temperature. But, it is quite accurate over a large range as long > as the coefficients are accurate. The thermistor manufacturer gives > you the coefficients so all you have to do is plug in the numbers. > This is a no-brainer in any high level language and we have it running > in BASIC here in our lab. However, it's probably rocket science to get > it to work in a PIC. At least it seems like it to someone who has no > experience in programming microcontrollers (me). For my hottub (http://hamjudo.com/cgi-bin/hottub) I use a 6811 (sorry, wrong list) to read the thermistors. I actually do the conversion to temperature on a workstation, but I could do it on the 6811 if I wanted to. I use linear interpolation into a lookup table. I plotted the "correct" values, the "approximate" values and the difference. When I got the difference small enough in the temperature range that I cared about, I said enough, and went on to other things. I'm using an 8 bit A to D convertor fed by a simple voltage divider. If you're using a 16 bit A to D, you'll probably still want to use interpolation, perhaps not linear interpolation. --- Paul Haas paulh@hamjudo.com Web site: http://hamjudo.com/index.html Home: (313) 487-8739 Office: (313) 487-4357 Fax: (313) 487-4371 Finger or email my hottub at hottub@hamjudo.com, seen on TV