I got my PIC 18F2550 blink an LED, but I cannot write to LCD
LCD is working with other PIC, no hardware issue here
PIC 18F2550, Xtal 10 Mhz
This is my code
Code:
DEFINE OSC 10
DEFINE LCD_DREG PORTB ' LCD data port
DEFINE LCD_DBIT 2 ' LCD data starting bit
DEFINE LCD_RSREG PORTB ' LCD register select port
DEFINE LCD_RSBIT 0 ' LCD register select bit
DEFINE LCD_EREG PORTB ' LCD enable port
DEFINE LCD_EBIT 1 ' LCD enable bit
DEFINE LCD_BITS 4 ' LCD data bus size
DEFINE LCD_LINES 2 ' Number lines on LCD
DEFINE LCD_COMMANDUS 2000 ' Command delay time in us
DEFINE LCD_DATAUS 50 ' Data delay time in us
Bookmarks