Quote Originally Posted by mackrackit View Post
Can you post a schematic of you hook up or give a pin to pin description?

In you other thread you mentioned using four wires, well it does take four wires for the data but two more for "control".

You do not need an external OSC to use a LCD, but the configuration will need to be correct.

Hi Mackrackit,

Here is the pin to pin description of my schematic:

PIC 18F4525 ------ LCD HD44780 (16X2)
B0-------- Pin4 -RS
B1-------- Pin6- Enable
B4-------- Pin11- D4
B5-------- Pin12- D5
B6-------- Pin13- D6
B7-------- Pin14- D7

LCD Pin3- connected to a 20K pot for contrast. The screen still shows black boxes !!!
LCD Pin5- R/W is connected to ground.

PIC Pin1- MCLR is not connected to anything. Is this a problem ?


Here is the code I am using:

DEFINE OSC 8

'******Setting up the LCD display******

DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50


@_CONFIG_CONFIG1H_OSC_INTIO67_1H

TRISB=0 'Set Port B as output



PAUSE 1000

LCDOUT $FE, 1
LCDOUT "PIC - LCD Test "
LCDOUT $FE, $C0
STOP



Please Help !!!