In this tutorial we will learn how to interface LCD with AVR Microcontroller specifically ATmega32A. This could be very cool experiment to add display to your microcontroller based projects. These LCD modules are very efficient to receive information and control commands from microcontroller. There are plenty of different manufacturer and type of display available in market. The one we are interested in here is JHD204A (20×4 LCD Module) which is basically china made cheap and available anywhere in retails shops. I am not a personally a fan of this display but this is the only cheapest LCD module available with me at this moment.
This is also probably the best tutorial for people who want to use LCD without understanding much about working parts of it. As explaining about each part of LCD in detail is nearly impossible so I decided to make this article know how or instruction based. The first step for this experiment is to make basic connections between pins of LCD module which are in total 16 with ATmega32A microcontroller. If you want to make sure that either your LCD is working or not then please follow link
Interface LCD JHD20x4/JHD16x2 to AVR Atmega32A
Click on image to zoom (better picture)
click on image for Zoom
Once you finished with basic connection between LCD module and ATmega32A. We can jump right into programming so that we will show custom message on LCD screen. Before we get into it one must understand the sequence of operation we have to perform such as initialization, check busy state, and then write character or string to flash onto LCD screen. It would be so much if I explain role of each function into program either I prefer to recommend you to look into code and datasheet of LCD. If you spend enough time to leer with it you will find name of functions in code itself are pretty explanatory. Let’s have a look into code snippet.