Try this:
Code:DEFINE OSC 8 DEFINE LCD_DREG PORTB ' portb is the port used for data lines DEFINE LCD_DBIT 4 'the pin on port connected to LCD pin DB4 DEFINE LCD_RSREG PORTA 'pic port used for the RS line DEFINE LCD_RSBIT 4 ' port pin where RS pin is connected DEFINE LCD_EREG PORTB ' PIC port where E pin is connected DEFINE LCD_EBIT 3 ' port pin where E pin is connected DEFINE LCD_BITS 4 ' 4 bit mode DEFINE LCD_LINES 2 ' 2 LCD lines DEFINE LCD_COMMANDUS 2000 'delay between LCD commands DEFINE LCD_DATAUS 50 'delay between data sent adcon1=7:trisb=0:trisa=0:intcon2.7=0:osccon=$70 PAUSE 1000 repeta: high portb.0:LCDOUT $fe,1,$fe,2, "hello":pause 1000:goto repeta




Bookmarks