Quote Originally Posted by dragons_fire View Post
i have tried to use both a 16f628 and a 16f877a to output to a matrix orbital serial lcd. with a 10mhz crystal, everything works fine. the code with the 10 mhz crystal is:

@ DEVICE HS_OSC
DEFINE OSC 10
cmcon = 7

'variables
'----------------------------------------------------------

baudLCD CON 32 'baud rate for lcd
lcd VAR PORTA.3 'lcd port

'Startup Program
'--------------------------------------------------------------------------------------

high PORTD.0
Pause 3000
Low PORTD.0
SerOut2 lcd, baudlcd,[254,"X"] 'clear screen
Pause 100
SerOut2 lcd, baudlcd,[254,"X"] 'clear screen again
SerOut2 lcd, baudlcd,[254,"P",140] 'change resolution
Pause 100

'main program
'----------------------------------------------------------

start:
SerOut2 lcd, baudlcd,[254,"G",1,1,"HELLO"]
pause 500
goto start
end

when i change it out to 20mhz crystal, i shouldnt have to change the bausd rate or anything, just the "define osc 20"
right? both chips im using, are the -20 versions, and the datasheet says they will do 20.
thanks for any help...
Probably need to add a bit more delay for the LCD, command_us and data_us. Add those defines and increase them until it works (note:data_us is a byte value, only goes to 255, command_us is a word value).
Maybe a bit of character pacing on the serial port? Try a bit of a delay there also.
For further reference, it's all in the little green manual...