The (HD44780 compatible) (10-25 Euro) 4x20, 4x16 (or 2x16)
backlight alphanumeric LCD attached to GenBoard using
- 4 bit data: PORTA 0xF0, same as LEDS (just solder to the smd resistors)
- 3 control lines on 5x2 geader (PORTD and PORTG) see lcd.h in
firmware (finally standardized at 2003.08.18. so look for a later
cvs snapshot, preferrably a current one). But read forward.
The AVR-pin LCD-pin associations:
- PA4..PA7 DATA4..DATA7(11..14)
- PD4 ENABLE (6)
- PG1 RS(4)
- PG0 RW-DDIR(5)
- GND GND(1)
- 5V VCC(2)
If you use a convenience pinheader->DB9 (male on the wire that's connected to
GenBoard, female on the wire connected to the LCD)
connector between the GenBoard and the LCD
, I suggest the following DB9 pinout (THIS IS NOT THE ONBOARD
RS232 CONNECTOR, BUT ONE CONNECTED TO 5x2 HEADER AND LED-CONTROL PA4..PA7)
- 1: VCC (5V)
- 2: DATA7
- 3: RS (this will be reused as positive-active backlight-PWM control!)
- 4: Enable
- 5: DATA4
- 6: GND
- 7: DIR (RW) (This is not strictly necessary (can be connected
to GND on the LCD). Only needed for
polling the busy state, which can be disabled in config. I use my LCD without
busypolling. You can use this for negative supply if your LCD needs one,
but be sure to note this on the connector (you write the pinout on a paper attached to the connector, of course).
- 8: DATA6
- 9: DATA5
works fine.
It's cool. Especially with the PC (PS2/AT) keyboard connected
You need to take care of the CONTRAST VOLTAGE.
Most LCD's work with a small positive contrast voltage
(10 kOhm from GND to +5V,
middle point connected to contrast, normally much
closer to GND), some need GND as contrast voltage.
Some need negative voltage, which can be acquired
from the max232 on MSAVR GenBoard, some high
contrast display need it. How do you know in advance what
polarity contrast-voltage your LCD
will want? I do not know.
a 2x16 LCD works, but the menus are optimized
for 4x20 LCD (4x16 also quite good)
See the firmware.
How to control a HD44780- based Character-LCD
(see google: HD44780 LCD)
genboard page