Try the following. Lm335 is 10mv / deg c Set ref on chip or vcc to 5.12v Therefore each count on the adc is 0.5 deg (5.12v / 1024 steps)or 5mV Given in the lm335 data sheet is 25deg is 2.982v 0 deg c is therefore 2.732v (read as 2.730v) or a count of 546 dec So degC = Vadc - 546 / 2 or 16 bit subtraction then RRF on the LSB and its good for 0-48 deg Regards Steve..... -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Dale Botkin Sent: 18 November 2002 14:13 To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]:Dividing In Asm (temp sensor) On Mon, 18 Nov 2002, Peter McNulty wrote: > I'd like to use these methods, but my temperature sensor must fit into > small places which is why i'm considering the Lm335. I'd prefer to use > a flat thermistor, however the non-linerality of the Temp-Voltage > relationship makes it very difficult. Dallas (now Maxim) DS18S02... 1-wire interface, TO-92 package, output in degrees C. Dale -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads