4-bit LCD problem while interfacing, program fluctuation

Status
Not open for further replies.

ucsam

Advanced Member level 4
Joined
Oct 12, 2010
Messages
119
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
kathmandu,nepal
Activity points
2,058
i have interfaced LCD in 8 bit mode, but when i tried to do in 4bit mode, then there is fluctuation while running the program, i am using 8051, it all works well with 8bit mode, but the program on 4bit sometimes works and sometime doesn't. What might be the reason?
 

the lcd initialisation commands are different for 8 bit and 4 bit... for 8 bit it is 0x30, 0x38, and for 4 bit it is 0x20 and 0x28.. the remaining commands are same...

you cannot run 8 bit program by just configuring the hardware to 4 bit... the data and commands has to be shifted and sent from controller...

put your code and circuit......
 
post your code and circuit... Is it on simulation or actual hardware.....
 

this link explains how to set the lcd for 4 or 8 bit, and how to send the commands **broken link removed**
 
i have changed the initialization codes as well, other wise how would it run once and not run the other time. I have attached the code, this is actually a library/header file.

---------- Post added at 03:30 ---------- Previous post was at 03:28 ----------

sorry i m going to paste the code..some thing i going wrong with the server




this is on actual hardware, hardware connections are all good. I am using JHD162A,

lcd port ====> P2
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…