Discussion in "Project Doubts" started by    pratikshinde    Jul 19, 2012.
Thu Jul 19 2012, 04:57 pm
#1
Hello,

I have made a custom design for 8051 board, I have successfully interfaced 16x2 lcd with 8051(P89V51RD2) in 4bit mode, which is connected to PORT0
P0.0 RS
P0.1 RW
P0.2 EN
and P0.4 to P0.7 data lines
, which was working fine.

Now I have made 2nd revision of that board in which the lcd is not working, but if I connect same LCD to PORT1 its working fine with same code,
there are no major changes in schematic except addition of two components, a switch and a capacitor. I have checked for continuity with Pull Up resistors
and everything is fine. even I tried with 10kΩ and 4.7kΩ resistor networks as pull ups but did not work.


Any help in this regard will be highly appreciated!
Thu Jul 19 2012, 07:38 pm
#2
@pratikshinde

Without having a look at schematics it is tough to arrive at a conclusion.
So upload the schematic of your circuit,so that we can help you finding your problem.
Fri Jul 20 2012, 05:23 pm
#3
@ pratikshinde
then main reason can be pull up resistor
if that is ok then nothing look like remaining
can u post ur schematic
Fri Jul 20 2012, 06:05 pm
#4
I am attaching my schematic.

Fri Jul 20 2012, 06:14 pm
#5
@ pratikshinde
now can u share ur code to match it with ur schematic
Fri Jul 20 2012, 06:19 pm
#6
Yes, here is my code.

I have called function mentioned in this file from my main.c, which works fine on PORT1 but not on PORT0
Fri Jul 20 2012, 06:27 pm
#7
code
Attachment


[ Edited Fri Jul 20 2012, 06:28 pm ]
Fri Jul 20 2012, 11:44 pm
#8
@pratikshinde
Hello pratik,

The code which you have posted ,in there i couldnot find the sequence of initialization that tells the LCD controller that user has selected 4-bit mode of operation .

for more information on 4 bit LCD visit- http://www.8051projects.net/lcd-interfacing/lcd-4-bit.php

Here is the corrected code with proteus simulation .I have added the initialization sequence function.
Have look at it.

 ExperimenterUK like this.
Sat Jul 21 2012, 02:52 pm
#9
Hello Curiou_Som,

Thanks,

which proteus version are you using? I tried this code, still no success,
Sat Jul 21 2012, 03:19 pm
#10
@pratikshinde

Hello pratik,

I am currently using proteus v7.8.
Have you checked the connections of pullup resistors to P0 pins?
only P0 doesn't have internal pull up, so you must provide pullup resistors to P0.

In the proteus simulation the code was working i think ?

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am