EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

How to use a 4x20 lcd.

Started by sani_figs July 29, 2008
Hi,

I need to use an lcd display for my project and what we have here is a
4x20 lcd. However, I can't find any starters's guide for using such device.
Btw, I'm using a zilog mcu and I have enough I/O pins for all the pins of
the lcd. It's better if your reference or sample code is in zilog syntax.
Thanks!
"sani_figs" <adrian_figui@yahoo.com> wrote in message
news:3LmdnbCRkPYslBLVnZ2dnUVZ_gSdnZ2d@giganews.com...
> Hi, > > I need to use an lcd display for my project and what we have here is a > 4x20 lcd. However, I can't find any starters's guide for using such
device. Try looking for a datasheet of the HD44780 LCD controller chip. This one or one of the gazillion clones is used in almost every character LCD and they all follow the same command syntax.
> Btw, I'm using a zilog mcu and I have enough I/O pins for all the pins of > the lcd.
Make sure you create a cycle time of 1 us or slower on the pins. The HD44780 is a slow chip.... Meindert
On Tue, 29 Jul 2008 07:14:41 -0500, "sani_figs" <adrian_figui@yahoo.com>
wrote:

>Hi, > >I need to use an lcd display for my project and what we have here is a >4x20 lcd. However, I can't find any starters's guide for using such device. >Btw, I'm using a zilog mcu and I have enough I/O pins for all the pins of >the lcd. It's better if your reference or sample code is in zilog syntax.
The Optrex manual is a pretty good guide to the character LCD displays. http://www.optrex.com/pdfs/Dmcman_full.pdf The initialization routines are where many first-time users have problems. The manual above has step-by-step directions for initialization in 4-bit and 8-bit modes. Be sure to follow them, including the required delays between steps. Once it's initialized, you'll have the choice of using either the busy flag or waiting a pre-set maximum period between characters. Note that some clones may require different max delays and some instructions, e.g., clear and home, may require more than a single character delay. -- Rich Webb Norfolk, VA
Hi,

Thanks! I think these info will suffice for now. :)
In message <3LmdnbCRkPYslBLVnZ2dnUVZ_gSdnZ2d@giganews.com>, sani_figs 
<adrian_figui@yahoo.com> writes
>Hi, > >I need to use an lcd display for my project and what we have here is a >4x20 lcd. However, I can't find any starters's guide for using such >device. >Btw, I'm using a zilog mcu and I have enough I/O pins for all the pins >of >the lcd. It's better if your reference or sample code is in zilog >syntax. >Thanks!
The daddy... http://www.epemag.wimborne.co.uk/resources.htm How to use Intelligent LCDs Excellent starter guide. -- Clint Sharp
Hi, the display is not consistent with every restart of my lcd display.
when trying to display a simple "Hello World!", the output on the lcd is
sometimes: "Hel o W rld!", "Hello W rlt!", or "H  lo Wo ld!".
Any insights on this matter? 

Thanks! 

On Mon, 04 Aug 2008 05:29:35 -0500, "sani_figs" <adrian_figui@yahoo.com>
wrote:

>Hi, the display is not consistent with every restart of my lcd display. >when trying to display a simple "Hello World!", the output on the lcd is >sometimes: "Hel o W rld!", "Hello W rlt!", or "H lo Wo ld!". >Any insights on this matter?
There are a few different ways to implement the interface to a character LCD display correctly. However, the number of ways to do it incorrectly is very large. With no other information as to how you've implemented the interface (BUSY flag or wait-per-character? busy-wait loops or timer interrupt?) not to mention the rest of it (FIFO queue or a "direct from printf()"?) I'll go with: timing. -- Rich Webb Norfolk, VA
sani_figs wrote:
> > Hi, the display is not consistent with every restart of my lcd > display. when trying to display a simple "Hello World!", the > output on the lcd is sometimes: "Hel o W rld!", "Hello W rlt!", > or "H lo Wo ld!". Any insights on this matter?
My guess is that you are not checking some device (the display?) is free before sending to it. -- [mail]: Chuck F (cbfalconer at maineline dot net) [page]: <http://cbfalconer.home.att.net> Try the download section.

The 2024 Embedded Online Conference