Pic16F84A from Syed

Started by shafi008 May 1, 2009
Hi every one, This is Syed from NewJersey.

I am the beginner to this Pic microcontrollers. i Started with Pic16G84A displaying characters on LCD (HD44780U (LCD-II)).
Backlight is ON and the blank segments are displayed but no other information is displayed. The following the code which i wrote.

DEFINE LCD_DBIT 4
' Set LCD Register Select port
'DEFINE LCD_RSREG PORTB
' Set LCD Register Select bit
DEFINE LCD_RSBIT 1
' Set LCD Enable port
'DEFINE LCD_EREG PORTB
' Set LCD Enable bit
DEFINE LCD_EBIT 0
' Set LCD bus size (4 or 8 bits)
'DEFINE LCD_BITS 4
' Set number of lines on LCD
DEFINE LCD_LINES 2
' Set command delay time in us
DEFINE LCD_COMMANDUS 1000
' Set data delay time in us
'DEFINE LCD_DATAUS 50

Pause 500 ' Wait for LCD to startup

loop:
'Lcdout $FE, 1 ' Clear LCD screen
lcdout $FE, $80+4, "shafi"
' Lcdout "Hello" ' Display Hello
Pause 500 ' Wait .5 second

Lcdout $FE, 1, "Cool" ' Clear LCD screen
lcdout $FE, $C0,"world"
' Lcdout "World"
Pause 500 ' Wait .5 second
Goto loop
Should i initialize my LCD everytime?
Could you please help me out in this please?

Cheers,
Syed