I've connected a Hitachi 44780 LCD to a 16F84 exactly the same way as shown in the manual's page 94(pdf version).
This is my program:
DEFINE LCD_DREG PORTA
DEFINE LCD_DBIT 0
DEFINE LCD_RSREG PORTA
DEFINE LCD_RSBIT 4
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 3
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
TRISB.0 = 0
PAUSE 2000
LOOP:
LCDOUT $FE,1,"hello"
PORTB.0 = 1 'LED on
PAUSE 500
LCDOUT $FE,1
PORTB.0 = 0 'LED off
PAUSE 500
GOTO LOOP
END
When i tested it, the LED blinks but the LCD displays black boxes instead of "hello". HELP!!!! I've been trying to solve this problem for weeks!!!!! btw, i'm using PBP v2.40


Read page 189

Bookmarks