I've known Optrex were slow, but that's just plain ridicculous. Are you sure you told PICBasic you were working at 40MHz? I see that DEFINE OSC 40 statement, you sure you didn't miss-spell it?
What happens if you try this now...
loop:
LCDOut $FE, 1
Pause 1000
LCDOut "Line 1",$FE, $C0, "Line 2",$FE, $94, "Line 3",$FE, $D4, "Line 4"
Pause 1000
GoTo loop
You should get all the text displaying in one hit with a 1 second pause, and repeat. You need one puase somewhere to allow time to read what you've displayed before it gets erased again.
Amother point... have you otherwise accounted for grounding the R/W line? You've rem'd it out in your last posting, I trust you've not left it floating.
There's a couple of other defines for the LCD...
Define LCD_COMMANDUS 2000
Define LCD_DATAUS 50
You can try increasing those... (say double them as a starting point). You should be able to use your LCD with the PIC running at 40MHz without problems.
Melanie
Bookmarks