The table below shows the wiring between the LCD, ATmega32, and the 14 pin header that that connects the LCD to the microcontroller.
I use the standard 4 bit interface strategy to drive the LCD.
LCD Pins -> | 11 | 12 | 13 | 14 | 4
| 5 | 6 |
LCD Signals-> |DB4 |DB5 |DB6 |DB7 | RS |R/W | E |
ATmega32 -> |PC0 |PC1 |PC2 |PC3 |PC4 |PC5 |PC6|
ATmega Pins-> |22 | 23 | 24 | 25 | 26 | 27 | 28|
14 Pin hdr -> |12 | 11 | 14 | 13 | 3 | 6 | 5 |
14 pin header outline & pin numbering (viewed from the TOP)
_________________
|2 4 6 8 10 12 14|
|1 3 5 7 9 11 13 |
|______ _________|
^ triangle on side of header pointing to pin 1
Pin 1 -> VCC (+5VDC)
Pin 2 -> GND
Pin 4 -> Wiper of 10K potentiometer between VCC& GND.
Pin 7,8,9,10 NC (No Connection)