Good afternoon
Going through my stock of LCD displays and testing them no problem with the serial ones, I cannot get the AXE033 in I2C mode to work with my code.
The lower part of the code below was found on the forum, and worked well in serial mode, it gives current, min and max temperatures from a DS18B20. The two 4k7 resistors were not fitted as they are already on the AXE033 display. (Although I did temporary fit two 10ks in case) now removed))
The AXE was tested in I2C Mode ok using Dave Lincoln test code Hello 123. I can get the decimal points to display. The leg-less Y symbol wiggles when the temperature is increased but no digits of any use. I have hit the brick wall reading about the commands so I need some help please
http://www.picaxeforum.co.uk/showthread.php?19404-Help-with-high-low-temperature&p=181904&viewfull=1#post181904
thanks
Going through my stock of LCD displays and testing them no problem with the serial ones, I cannot get the AXE033 in I2C mode to work with my code.
The lower part of the code below was found on the forum, and worked well in serial mode, it gives current, min and max temperatures from a DS18B20. The two 4k7 resistors were not fitted as they are already on the AXE033 display. (Although I did temporary fit two 10ks in case) now removed))
The AXE was tested in I2C Mode ok using Dave Lincoln test code Hello 123. I can get the decimal points to display. The leg-less Y symbol wiggles when the temperature is increased but no digits of any use. I have hit the brick wall reading about the commands so I need some help please
http://www.picaxeforum.co.uk/showthread.php?19404-Help-with-high-low-temperature&p=181904&viewfull=1#post181904
Code:
'FRED I2C lcd display test. temprature part tested ok on serial lcd Post 19404 #8
'i2c lcd tested ok with dave lincoln code.
#picaxe 08m2
main:
pause 500 'Delay to allow AXE033 module to initialize
'b0 = 43
i2cslave $C6,i2cslow,i2cbyte 'Initialise I2C, AXE033 device = $C6
writei2c 0, ($FE,$80, $FF) 'Move to line 1 char 0
pause 10 'Delay to allow command to complete
writei2c 0, ("Temp ",b1,$2E,b2,$FF) 'Tinkered show variable
pause 10 'Delay to allow command to complete
writei2c 0, ($FE,$C1, $FF) 'Move to line 2 char 1
pause 10 'Delay to allow command to complete
writei2c 0, ("Max ",b4,$2E,b5, "Min",b8,$2E,b9,$FF)' Tinkered Write a variable
pause 10 'Delay to allow command to complete
'Temp
w2 = 0
readtemp12 4,w1 'Read temp high resolution
If w1 > w3 then
let w3 = w1
endif
If w1 < w5 then
let w5 = w1
endif
w2 = w1
w2=w2*10/16 'Current
b0=w2/10 'First digits
b1=w2//10 'Decimal points
w4 = w3
w4=w4*10/16 'High
b4=w4/10 'First digits
b5=w4//10 'Decimal points
w6 = w5
w6=w6*10/16 'Low
b8=w6/10 'First digits
b9=w6//10 'Decimal points
goto main
thanks