You might want to go ahead and add DEFINE's at the beggining of your program, and the first PAUSE 500, change to Pause 1000
Make sure the correct LCD pins are going to the correct PIC pins, some LCDs pinouts are different even if they have 14 or 16 pins.
What did you use to set your occilator value, if your not using a internal OSC you might need to DEFINE OSC. You will probobly want to use a TRIS command to define the I/O of your pins too, this causes alot of problems when left out.
What I find is that if the LCD is a 2 line display, and the top is full and bottom empty, the LCD is not initialized, on a 4 line its the top 2.
it will usually do this for about a second when first turned on then will clear and then show data when its working right.
Look in the manual and read up on DEFINE, LCDOUT you can also access a free ebook on GoogleBooks, search for "30 pic projects" on the google books site, its great for learning PBP.
Here is a program I wrote for 18F 40Pin devices and only using PORT D for "Display", You can also tie a LED (Long Leg) directly to PORTD Pin 6 and the Short Leg to GND the led will be very bright, you can add a resistor if you want.
Code:
DEFINE LCD_DREG PORTD ' LCD Data bits on PORTD
DEFINE LCD_DBIT 0 ' PORTD starting address
DEFINE LCD_RSREG PORTD ' LCD RS bit on PORTD
DEFINE LCD_RSBIT 5 ' LCD RS bit address
DEFINE LCD_EREG PORTD ' LCD E bit on PORTD
DEFINE LCD_EBIT 4 ' LCD E bit address
DEFINE LCD_BITS 4 ' LCD in 4-bit mode
DEFINE LCD_LINES 4 ' LCD has 4 rows
TRISD = 0 ' PORTD is output
PAUSE 1000 ' Wait 1 sec for LCD to initialize
LCDOUT $FE, 1 ' Clear LCD
AGAIN:
LCDOUT $FE, 2
LCDOUT $FE, $80
LCDOUT "I Am ---"
Pause 500
LCDOUT $FE, $80
LCDOUT "WORKING!"
PAUSE 500 ' Wait .5 seconds
TOGGLE PORTD.6 ' Blink LED to show Program Running
GOTO AGAIN ' Repeat
END
Bookmarks