TEMPERATURE will need to be more than 8 bits if you want higher resolution over the full temperature range. Gary. -------------------------------------------- Email: Gary.Fowler@dsto.defence.gov.au Phone: +61 8 8259 5767 Fax: +61 8 8259 5672 Defence Science & Technology Organisation PO Box 1500, Salisbury, South Australia 5108 -------------------------------------------- ---------- > From: nogueira > To: Multiple recipients of list PICLIST > Subject: DS1820 > Date: Sunday, 1 September 1996 18:23 > > Hi all, > > I'm using the DS1820 one-wire temperature sensor from Dallas and I'm very > happy with it. It works very well and I have routines avaible to PICs. > > In order to get a resolution grater than 0.5 degree I need to do the > following math, I'd like to get help solving this: > > TEMPERATURE=TEMP_READ-0.25+(COUNT_PER_C-COUNT_REMAIN)/COUNT_PER_C > > where: > TEMP_READ = 8 bits > COUNT_PER_C = 8 bits > COUNT_REMAIN = 8 bits > TEMPERATURE = 8 bits > > I just want a small routine to do this math. If anyone can help me, > I will put the wole routine to use ths DS1820 on the list. > > Regards, > > Octavio > -- > ======================================================== > Octavio Nogueira > e-mail: nogueira@mandic.com.br > homepage: http://ourworld.compuserve.com/homepages/tato > voice/fax: +55 11 240-6474 > ======================================================== > "ProPic" The first Production PIC Programmer running in > Windows and under US$ 20.00. > Avaible at http://ourworld.compuserve.com/homepages/tato >