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...
Bookmarks