In order to clear up I wil start a new thread
Im new in coding and have some difficulties to understand why the coding below are not operating as I expect,
Hoping you will be kind to guide me to an good solution
PowerOnReset:
GOSUB InitialiseLcd
DisplayLine1:
READADC 0,b0
byte = $80; Start Line 1
GOSUB SendCmdByte
EEPROM 6,("Solfanger Top: "
FOR get = 6 TO 20
READ get,byte
GOSUB SendDataByte
NEXT
byte = b0 / 100 + "0"
GOSUB SendDataByte
byte = b0 / 10 // 10 + "0"
GOSUB SendDataByte
byte = b0 // 10 + "0"
GOSUB SendDataByte
byte = $DF
GOSUB SendDataByte
byte = "C"
GOSUB SendDataByte
READADC 0,b1
if b1 > 90 then Led_1_ON
low 1
debug b1
pause 500
goto DisplayLine1
Led_1_ON:
high 1
goto DisplayLine1
InitialiseLcd:
FOR get = 0 TO 5
READ get,byte
GOSUB SendInitCmdByte
NEXT
For the debug result please see: www.sunwind.dk/Debug1.jpg
When I teat the following on its own it seems to function well.
DisplayLine1:
READADC 0,b1
if b1 > 90 then Led_1_ON
low 1
debug b1
pause 500
goto DisplayLine1
Led_1_ON:
high 1
goto DisplayLine1
For the result of the debug please see it shown here: www.sunwind.dk/Debug2.jpg
Best regards
Monie
Im new in coding and have some difficulties to understand why the coding below are not operating as I expect,
Hoping you will be kind to guide me to an good solution
PowerOnReset:
GOSUB InitialiseLcd
DisplayLine1:
READADC 0,b0
byte = $80; Start Line 1
GOSUB SendCmdByte
EEPROM 6,("Solfanger Top: "
FOR get = 6 TO 20
READ get,byte
GOSUB SendDataByte
NEXT
byte = b0 / 100 + "0"
GOSUB SendDataByte
byte = b0 / 10 // 10 + "0"
GOSUB SendDataByte
byte = b0 // 10 + "0"
GOSUB SendDataByte
byte = $DF
GOSUB SendDataByte
byte = "C"
GOSUB SendDataByte
READADC 0,b1
if b1 > 90 then Led_1_ON
low 1
debug b1
pause 500
goto DisplayLine1
Led_1_ON:
high 1
goto DisplayLine1
InitialiseLcd:
FOR get = 0 TO 5
READ get,byte
GOSUB SendInitCmdByte
NEXT
For the debug result please see: www.sunwind.dk/Debug1.jpg
When I teat the following on its own it seems to function well.
DisplayLine1:
READADC 0,b1
if b1 > 90 then Led_1_ON
low 1
debug b1
pause 500
goto DisplayLine1
Led_1_ON:
high 1
goto DisplayLine1
For the result of the debug please see it shown here: www.sunwind.dk/Debug2.jpg
Best regards
Monie