How to use a 4x20 lcd.

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!
Reply to
sani_figs
Loading thread data ...

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.

Make sure you create a cycle time of 1 us or slower on the pins. The HD44780 is a slow chip....

Meindert

Reply to
Meindert Sprang

The Optrex manual is a pretty good guide to the character LCD displays.

formatting link

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
Reply to
Rich Webb

Hi,

Thanks! I think these info will suffice for now. :)

Reply to
sani_figs

In message , sani_figs writes

The daddy...

formatting link

How to use Intelligent LCDs

Excellent starter guide.

--
Clint Sharp
Reply to
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!

Reply to
sani_figs

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
Reply to
Rich Webb

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]: 
            Try the download section.
Reply to
CBFalconer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.