AVR LCD Interface Howto
Alphanumeric LCD modules are a common output device. Useful for many applications and also they make debugging easier.
Modules come in sizes from 8*1 to 20*4 or bigger. Typical 16*2 modules cost £5-£20.
All modules run from 5v at very low current, however backlight, if used, will be 50mA or more. Modules will be visible with or without use of backlight. Some modules are better quality than others.
Module hardware connection is typically by 16 way ribbon cable from an IDC connector on the main PCB. The modules have plug-in or solder-tag connections - either can be soldered to ribbon cable.
Note that all modules have aa adjustable voltage input that controls contrast and which is connected to a trimmer pot on PCBs. You must adjust this correctly to set up LCD - incorrect adjustment will make LCD completely invisible - be warned.
Module interface is a standard 16 pin bus (however check polarity of backlight connections since this varies). Interface to this bus from microcontroller requires at least 6 GPIOs and a software driver. With the addition of a 74HCT164 shift register a 3 wire interface is possible which uses only 3 GPIOs. Hardware schematics & sample code for this interface are available with the EEE Zigbit boards - see zigbit.zip for hardware and avrcode.zip for sample software.
Note that LCD driver code is slow - one character output may take 200us to 1ms. Therefore writing to LCD from interrupts may not be advisable.