CPU = 16F876 MHZ = 10 CONFIG 16254 ;*********************************************** ; http://www.basicmicro.com ; Title : owin.bas ; Author : Dale Kubin ; Date : 04/29/02 ; One Wire commands. Read a Dallas one wire ; DS1820 chip. Use the float command to handle the ; decimal point. ;*********************************************** temp var word temp1 var word Convert var long counter var byte main Owout B0,1,main,[$cc,$44] Wait owin B0,0,[temp] if temp = 0 then wait Owout B0,1,main,[$cc,$be] owin B0,0,[temp.byte0,temp.byte1] Convert = float temp fdiv 2.0 Debug ["Temperature = ",real convert," C",13] goto main