$regfile = "2313def.dat" $crystal = 4000000 Config Sda = Portd.5 Config Scl = Portd.4 Config I2cdelay = 100 Config Pind.6 = Output Const Lm76write = &H90 Const Lm76read = &H91 Const Lm76resolution = 0.0625 Dim Tempint As Word Dim Tempbytelo As Byte Dim Tempbytehi As Byte Dim Temperature As Single Dim Tempstring As String * 4 Dim Tempsign As Byte Dim Flashnumber As Byte Dim Flashloop As Byte Dim Flashtime As Word Do Set Portd.6 Wait 1 Cls I2cstart I2cwbyte Lm76read I2crbyte Tempbytehi , Ack I2crbyte Tempbytelo , Nack I2cstop Lcd Tempbytehi ; " " ; Tempbytelo ; " " Tempint = Makeint(tempbytelo , Tempbytehi) Tempsign = Tempbytehi And 128 If Tempsign = 128 Then Tempint = Not Tempint Tempint = Tempint + 1 End If Shift Tempint , Right , 3 Lcd Tempint ; " " Temperature = Tempint * Lm76resolution Lowerline Lcd Temperature ; " " Tempstring = Fusing(temperature , "##.#") If Tempsign = 128 Then Lcd "-" Lcd Tempstring Reset Portd.6 Wait 1 Loop End