Hi, sorry to post this beginner question, but I'm having trouble displaying text to the LCD with Pic18F4550 on 4Mz..
Code:
Code:
Define OSC 48 ' Core is running at 48MHz
Define LCD_DREG PORTB
Define LCD_DBIT 4
Define LCD_RSREG PORTB
Define LCD_RSBIT 4
Define LCD_EREG PORTB
Define LCD_EBIT 4
DEFINE LCD_LINES 2 ' Set number of lines on LCD
DEFINE LCD_COMMANDUS 2500
DEFINE LCD_DATAUS 250
ADCON1 = 15 ' Set PORTA and PORTE to digital
Pause 100 ' Wait for LCD to start up
mainloop:
Lcdout $fe, 1 ' Clear screen
Pause 500 ' Wait .5 second
Lcdout "Hello" ' Display "Hello"
Pause 500 ' Wait .5 second
Lcdout $fe, $c0, "World" ' Move to line 2 and display "World"
Pause 500 ' Wait .5 second
Goto mainloop ' Do it forever
End
Attached is my pin connections on easypic6
I'm having doubts with my LCD Settings, and how can I make it work using 8Mz crystal?
thanks in advance,
tacbanon
Bookmarks