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!
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....
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.
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.
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.