8051/LCD in 4-bit mode problem

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello
 I am using Keil compiler and C in order to program an 805
microcontroller. I want to drive a Varitronix LCD modul
(MDLS-16265B-led04) which is connected in 4-bit mode (LCD data bits D4-D
to P2.0-P2.3 on the microcontroller). Although I have read many tutorial
and documentation about LCDs (many of them introduced by this forum) and
have used the proper initialization sequence I did not manage to make m
lcd work properly. The weird thing is that the simulation with Kei
compiler/debuger works properly (I am using the LCD dlls proposed a
www.c51.de) and the LCD functions ok but in real nothing works. Th
display stays in its "internal reset" mode (1 line lit only with ever
character black). The best thing I managed to do is display two letter
"He", instead of the full word "Hello" on the real LCD that flickered fas
and slided to the left(using both lines). This happend when I used th
initialization code for the LCD inside the main function loop an
everything was repeated (as I expected). Using the same initializatio
code inside a routine resulted in no function of the LCD as if th
initialization function was not called by the program. The microcontrolle
module is DS2250T which is based in the 8051 compatible DS5000. An
suggestions please? Thanks.


        
This message was sent using the comp.arch.embedded web interface o
www.EmbeddedRelated.com

Re: 8051/LCD in 4-bit mode problem
Typical LCD displays are very slow, often much slower than the micros
that drive them.  Have you confirmed that all your signals and
inter-signal delays are long enough, and have adequate setup and hold
times?


Re: 8051/LCD in 4-bit mode problem
On Sun, 26 Jun 2005 11:35:12 -0500, the renowned "chris"

Quoted text here. Click to load it

Maybe timing issues- either the delays or the setup/hold times for the
data.


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: 8051/LCD in 4-bit mode problem
wrote in comp.arch.embedded:

Quoted text here. Click to load it

Two others have already mentioned timing, and that actually could be a
very important issue in your case.

How are you determining the amount of time to leave data and control
signals active?

If the code samples you are using are for a plain 8051 (12 clock
cycles per machine cycle), are you taking into account the higher
speed of the DS5000?  Depending on the instruction mix, 4 clock 8051
clones like the DS5000 typically execute about 2 to 2.5 times faster
than a plain 8051 at the same clock speed.

--
Jack Klein
Home: http://JK-Technology.Com
We've slightly trimmed the long signature. Click to see the full one.
Re: 8051/LCD in 4-bit mode problem

Quoted text here. Click to load it

 I don't know the MDLS lcd, but I have used a DS2252T with a generic
4x16 LCD. But done all my work with a 8051 aaembler.. Just to say it
will work.

Re: 8051/LCD in 4-bit mode problem
Thanks to everybody that answered. I have solved the problem. I do not kno
exactly what was the issue but I rewrote the program from the beginin
carefully and everything went as it should. Now I have some small issue
with  small and capital letters (seems like they do not correspond t
ASCII) but I hope I will fix this soon. Thank you for your time.
Regards,
Chris.


        
This message was sent using the comp.arch.embedded web interface o
www.EmbeddedRelated.com

Site Timeline