communication with enable and read
strobe lines. Since we like to save pins
in our AVR designs, we will use the
four-bit mode. Of course, all that brain
fatiguing stuff we learned about bitwise
operators is going to come in handy.
■ FIGURE 6. LCDNAV with Arduino.
■ FIGURE 7. LCDNAV
wired to Arduino.
Wiring LCDNAV to the Arduino
Well, after all that preaching to
get folks to drill down through the
simpler library functions and use the
underlying C, we are going to do our
first demonstration of the LCD
LCDNAV wiring to the Arduino is as follows:
• DB7 Pin 2
Instructions on assembling the board are available on
www.smileymicros.com under the LCDNAV menu. The
schematics for this board are shown in Figure 5.
56 January 2012
LCD Hardware: The HD44780 LCD
I read a book (I think it was David Brin’s Practice
Effect) where some primitive people found a digital watch
with an LCD display. They were amazed that whoever
made the thing was able to train all the little black bugs to
run around and align themselves in such peculiar patterns.
That’s the extent of the detail I’ll give on the underlying
technology of LCDs. We’ll concentrate instead on using C
to train the little black bugs to do our tricks.
We are lucky since Hitachi developed a simple way to
control the LCD that has now become an industry
standard for low cost character LCDs: the HD44780
driver/controller chip that you’ll find built into our display.
They provide a parallel control interface that can send data
in either eight-bit or four-bit chunks, and control the
Using the LCD
We will use our avrtoolbox LCD elementary library which
somewhat duplicates the function in the Arduino LiquidCrystal
library (but in a more generalized fashion) to use with the
regular AVR C tools: AVRStudio, WinAVR, and avrdude. The
source code is located in avrtoolbox\libavr\testers\source \
lcd_hd44780. I owe a debt to Peter Dannenger for his
LCD tutorial on AVRFreaks. His code provided a good
starting point for porting the Arduino LiquidCrystal functions
viewtopic&p=828978]. You can find the source code for
this library at
library has the following functions: