lcd in 4 bit mode problem

Status
Not open for further replies.

GURMEET singh

Junior Member level 2
Joined
Oct 10, 2012
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,402
Please correct me,if i am doing wrong..its not working:sad:


 

Without even looking into code flow, your delays are probably wrong. LCDs are quite slow devices and especially during initialization it is very important they have long enough to digest the bytes you feed them. A simple count down of 200 or 300 to zero is likely to take far shorter than the several mS delays needed. In particular, note how long the LCD needs from powering up to being ready for the start of initializing data, most need around 100mS. It looks like you are using a PIC although you haven't said which type, your present 'delay(200)' probably only lasts around 200uS when you really need several mS.

Why not use a timer to generate interrupts at say 1mS intervals and use those as the basis of delays, that lets you set precise timings from 1mS up to 65.5 seconds if you pass an integer value to a 1mS count down routine.

Brian.
 


I have corrected all the delays ...now its working fine,Thanks
 

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…