In previous example I showed a simple keypad programming example using C in Atmel Studio 7. It displays key value on a typical single seven segments display. We can add a character LCD as an output device.
In this programming example we use a 4x4 keypad matrix as a digital input, and a character LCD bases on HD44780 as an output device. A 20x4 character LCD is used to show information a key value.
Program starts up |
Port C is 8-bit wide, connects to a 4x4 matrix keypad as shown in the picture above. Port D connects to a character LCD in 8-bit mode. Read/Write pin is ignored, and it's connects to ground as the LCD just accept the data/command from micro-controller.
Atmega32 operates at 16MHz supplies at +5V DC supply voltage.
C main program shows below. It requires LCD and Keypad driver files that I don't show them here.
Click here to download this example in zip file. I additionally add its schematic diagram below.
Schematic |
If you want a standard PCB for ATMega32 micro-controller, you can order my AVR Microcontroller project from PCBWay with a reasonable price. Click here to get a free $5 credit for new account.
See Also,
No comments:
Post a Comment