I can't see why you don't get at least something out of the data and clock pins, these normally idle High anyways. Watch it with a scope if available.
Does your program go to NOACK every time? The "END" after it will cause it to stop right there. Put a GOTO Main instead.
I would also structure your program something like this:
Code:
Configs
pause 2000 ' lcd start up
i2cwritE DPIN, CPIN, $4C,[$FE, $04, 99],NOACK 'Sets contrast (0-100)
i2cwritE DPIN, CPIN, $4C,[$FE, $03, 200], NOACK 'Sets the brightness (0-250)
Main:
I2CWRITE DPIN, CPIN, $4C, [$FE,$14], NOACK ' Clears screen
i2cwritE DPIN, CPIN, $4C,["Hello World!"], NOACK 'text sent to the LCD, defaults to row 0, col 0
PAUSE 1500 'Next is to make sure all of above worked
HIGH PORTD.2 PAUSE 250
LOW PORTD.2 PAUSE 250
HIGH PORTD.2 PAUSE 250
LOW PORTD.2 PAUSE 250
HIGH PORTD.2 PAUSE 250
LOW PORTD.2 PAUSE 250
HIGH PORTD.2 PAUSE 250
LOW PORTD.2 goto main
NOACK:
HIGH PORTD.2
PAUSE 5000
LOW PORTD.2
PAUSE 1000
GOTO Main ' Start over
The LCD contrast and brightness only needs to be set up once before the Main loop unless you want to get fancy but save that till later.
Verify the Address $4C is correct otherwise all your attempts to write to the LCD will be ignored.
Bookmarks