Im using a PIC18F252 with a 16x2 LCD with a 44780 controller and I cant get LCDOut to work. I just get a row of black boxes on the second line of the LCD. Ive been using the basic MicroCode Studio example for an LCD display:
' LCD should be connected as follows:
' LCD PIC
' DB4 PortA.0
' DB5 PortA.1
' DB6 PortA.2
' DB7 PortA.3
' RS PortA.4 (add 4.7K pullup resistor to 5 volts)
' E PortB.3
' RW Ground
' Vdd 5 volts
' Vss Ground
' Vo 20K potentiometer (or ground)
' DB0-3 No connect
@ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H
@ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
@ __CONFIG _CONFIG4L, _LVP_OFF_4L
Pause 500 ' Wait for LCD to startup
loop:
Lcdout $fe, 1 ' Clear LCD screen
Lcdout "Hello" ' Display Hello
Pause 500 ' Wait .5 second
Lcdout $fe, 1 ' Clear LCD screen
Lcdout "World"
Pause 500 ' Wait .5 second
Goto loop ' Do it forever
But it does not work. Do I need to define a bunch of "LCD_xxxx" things?
Bookmarks