NEW VERSION 3.16 BUG????

Status
Not open for further replies.

dim78

New Member
hello again from Greece....
my program was running fine with my old version of oshonsoft 18f IDE software...(i think was 2.85?? something like that...)
now after the update to 3.16 my DS18B20 I2C sensor do not working...it show 0.0 *C.....if i load the old hex file ..it work again normal.....
i also try to compile an example code and also it does not run...(show 0.0)....
my code is this...

so ....is a bug???? or i am doing something wrong????


Define 1WIRE_REG = PORTE
Define 1WIRE_BIT = 0



1wireInit
1wireSendByte 0x55, 0x28, 0xa7, 0x84, 0x75, 0x01, 0x00, 0x00, 0x91, 0x44
WaitMs 50
1wireInit
1wireSendByte 0x55, 0x28, 0xa7, 0x84, 0x75, 0x01, 0x00, 0x00, 0x91, 0xbe
WaitMs 50
1wireGetByte temp1.LB, temp1.HB




'---resolution 12bit => 0.0625 *C 1*C/0.0625=16

If temp1 < 2000 Then '2000*0.0625=125*C
temp11 = temp1 / 16
temp12 = ((temp1 - ((temp1 / 16) * 16)) * 10) / 16
cold_1 = 0
Else
temp1 = 65535 - temp1
temp11 = temp1 / 16
temp12 = ((temp1 - ((temp1 / 16) * 16)) * 10) / 16
cold_1 = 1
Endif




If cold_1 = 0 Then Lcdout "+", #temp11, ".", #temp12, $df, "C"
If cold_1 = 1 Then Lcdout "-", #temp11, ".", #temp12, $df, "C"
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…