PDA

View Full Version : LCD Problem!



uaf5000
- 19th May 2010, 21:59
Hello Guys,

I have interfaced LCD with my PIC 16f877a. I want to initially display words on my lcd but the problem is only garbage value is being displayed. Please tell me the solution. I have given the code which i used to program the MCU.


Regards.

CLEAR
DEFINE OSC 4
DEFINE LCD_DREG PORTD
DEFINE LCD_RSREG PORTE
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTE
DEFINE LCD_EBIT 1
DEFINE LCD_RWREG PORTE
DEFINE LCD_RWBIT 2
DEFINE LCD_BITS 8
DEFINE LCD_LINES 1
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
PAUSE 500
LOW PORTE.2
TRISD = %00000000
TRISE = %00000000
ADCON1=%00000111
LOOP:
LCDOUT $FE, 1
PAUSE 250
LCDOUT "HELLO"
LCDOUT $FE,$C0
LCDOUT "WORLD"
PAUSE 250
GOTO LOOP
END

BobK
- 19th May 2010, 22:44
Hello uaf5000,

No need to post in several places. I replied in your posting in the SERIAL forum.

BobK

uaf5000
- 19th May 2010, 23:06
So sorry. I thought my post was much relevant here. Will reply there from now. Thanks =)