Basic code problem white parallel HD44780

Jacobsen

New Member
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
 

hippy

Technical Support
Staff member
When you call the 'SendCmdByte:' and 'SendDataByte:' routines, output pins 0 and 1 are cleared within those routines, which causes the LED to be turned off.

This problem can be resolved by a small change to the LCD handling routines ...

http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=2528
 

Jacobsen

New Member
hippy

Agen..First off all I wish to thanks for the big help you you are providing to me!

It,s works fine now ;-)

Many Thanks.
Best regards
Monie
 
Top