Hello everyone! I hope you all will be absolutely fine and having fun. Today, I am going to combine all of my previous tutorials for LCD Interfacing with Microcontrollers, at a single platform for your easiness. You will able to see and learn the interfacing of LCD with three different microcontrollers. Before going into any detail I would like to tell you a bit about the history of LCD. There are a lot of devices in the market now a days, which can be used as the displaying devices. LCD’s are also among those devices and considered as the one of the most important devices specially for the microcontroller based projects. The word LCD is basically abbreviated from Liquid Crystal Display because it is made up of Liquid Crystal Technology. LCD is also a great debugging tool just like Serial Port.
It becomes a lot difficult to use any debugger every time and is not reliable too. Where as LCD’s can used to observe the output quickly while making changes in your code. It plays a vital role in almost all kinds of microcontroller based as well as electronic based projects. While making these types of projects we need to display the output and some messages. Seven segment is the basic the device to do that task but it has a lot of limitations. Another best option available is LCD. It comes in different dimensions. The most commonly used LCD’s have dimensions of 16×2 i.e. 16 columns and 2 rows. It is capable of displaying 32 ASCII characters, 16 characters per line. Other dimensions of the LCD includes 20×4, 128×64 etc. You just need to know how to interface the LCD and then you will find that it is the easiest, cheapest and reliable output device available in the market. LCD has a wide range of applications e.g. robotics, power electronic based projects, microcontroller based projects, mobile phones, cameras, high resolution color displays.
LCD Interfacing with Microcontrollers
Here in the tutorial, LCD Interfacing with Microcontrollers, I will tell you about the configuration of the LCD, its pins specifications and about the procedure to interface it with different microcontrollers e.g Arduino, PIC Microcontroller and 8051. First of all, I would like to tell about the desired components and their specifications in the form of a list.
The list for the basic and necessary components required while LCD Interfacing with Microcontrollers is given below.
- Microcontroller (Arduino, PIC, 8051)
- Jumper Wires (Male-female)
- Soldering Iron
- Soldering Iron and Gum
- Male Pins for LCD
- LCD (either 16×2 or 20×4)
- Microcontroller acts as the back bone of any project because it controls and handles all the tasks and is used to exchange the desired commands either serially or simultaneously. In the tutorial LCD Interfacing with Microcontrollers, I am going to use three different microcontrollers as the backbone of the project, i.e. Arduino, PIC microcontroller and 8051 microcontroller.These microcontrollers are shown in the figure below.
- Jumper Wires are basically used for making the connections between microcontrollers and LCD in order to obtain the circuit in proper working condition. The jumpers wires are usually of for different types i.e. male-male, male-female, female-female and female-male. The jumper wires are shown in the figure below.
- Soldering Iron is used to join the male pins with the LCD specifically in this case. Its a device or an electronic equipment used to make the permanent connections between two or more devices. Soldering Iron is shown in the figure below.
- Soldering Gum and Stand are used for the purpose of clean soldering and supporting the solder respectively. The soldering gum along with the soldering stand is shown in the figure below.
- Male Pins for LCD are used to make connect between LCD and microcontroller. These supporting pins are shown in the figure below.
- Liquid Crystal Display (LCD) is used to display output messages and the desired results. LCD are available in the markets now a days, in different sizes. 16×2 and 20×4 are the most commonly used dimensions of the LCD. This type of LCD has 16 pins. Each pin is associated with the different function. The functions associated with each pin of the LCD are shown in the table below.
- LCD can be operated in two different modes 4-bit mode and 8-bit mode, depending upon the selection of data pins. If we have selected four of its data pins (DB0-DB3) then LCD will be in 4-bit operating mode and if we have selected all of its data pins (DB0-DB8) the LCD will operate in 8-bit mode. 16×2 LCD is shown in the figure below.
- Another most frequently used small LCD with 20×4 dimension is shown in the figure below.
- For the proper working of LCD in 4-bit mode we need to use four of its data pins i.e. (DB4-DB7). In total we need to use 8 pins including RS, Enable, DB4, DB5, DB6, DB7, Voltage (5V) and Ground (0V). Data pins are used for the exchange of the data between microcontrollers and LCD.
- RS is the pin 4 of the LCD and it selects data register when high and command register when low as described in the above table.
- Enable is the pin 6 of the LCD. When it is high a low pulse is provided and it i used to send data to data pins (DB4-DB7) in this case.
- So, that was the brief discussion of the components necessary for LCD Interfacing with Microcontrollers.
- Now, I am going to combine all of my previous tutorials related to LCD interfacing with different microcontrollers here on a single platform.
New LCD Library for Proteus
In this tutorial, I have shared a new LCD library for Proteus which will help you in interfacing LCD with Arduino or any other microcontroller in Proteus ISIS. We have designed two new LCDs in Proteus. Proteus already has builtin libraries for LCD but they are not such good looking. So, I designed them which are good looking as compared to the builtin LCDs of the Proteus.
I have provided two different libraries in this package. You just need to copy and paste them in libraries folder of your installed Proteus software. After restarting the Proteus software you will be able to search two different LCD’s with excellent external look. Pick anyone of them from the search option and start interfacing it with the Arduino in Proteus and observe its working.
- You can download these libraries here by clicking on the button below.
- Download .rar file, extract it and enjoy these libraries.
LCD Interfacing with Arduino
Here, in this section of the tutorial LCD Interfacing with Microcontrollers, I will combine my previous tutorials having detailed discussion about how to interface LCD with Arduino.
Scrolling Text on LCD with Arduino
Here, in the tutorial Scrolling text on LCD with Arduino, I have shared my knowledge with all of guys that how make an algorithm in Arduino software in order to generate a scrolling text on LCD. I have used a very basic 16×2 LCD in Proteus for this article.
This tutorial will help you to learn how to interface 16×2 LCD with Arduino and how to display a scrolling text on it in Proteus. I have written a simple code to print the name of our website on LCD first, then I updated the same code for displaying the name with a movement in both left and right direction.
- You can download the Arduio source for displaying scrolling text on LCD.
- Download .rar file, extract it and enjoy the complete code.
ADC Value on LCD using Arduino
In the tutorial ADC Value on LCD using Arduino, I have provided the detailed discussion about the circuit designing for LCD to interface it with Arduino. The design consists of two types of transformers named as current transformer and potential transformer. AC power is supplied to these transformers which is converted into 5V later. After designing the circuit properly I have designed an algorithm to display ADC values on LCD using Arduino.
The second part of this section of the tutorial LCD Interfacing with Microcontrollers consists of the source code for displaying ADC values on LCD using Arduino in Proteus. The algorithm is very simple and is easy to understand. The function for displaying voltage is a bit complicated but not so difficult.
- You can download the circuit designed in Proteus and the Arduino Hex file here by clicking on the button below.
- Just download the .rar file, extract it and enjoy the complete package containing both Proteus design as well as Arduino Hex file.
LCD Interfacing with 8051 Microcontroller
In this section of the tutorial, LCD Interfacing with Microcontroller, I will explain you that how to interface an LCD with 8051 Microcontroller and the step by step procedure to design a simple program for 8051 microcontroller in order to display the messages on the LCD interfaced with it.
In the tutorial, I have given a detailed discussion about both, the designing of the circuit in Proteus as well as the source code for printing the text on LCD using 8051 microcontroller. I have divided this tutorial in two different parts.
The first part includes the designing of the circuit in Proteus whereas the second part contains the description about the embedded code for 8051 microcontroller. Source code is written using keil uvision3 compiler and 8051 microcontroller. I have used AT89C51.
- You can download the complete Proteus design and the complete source code here by clicking on the button below.
- Download .rar file, extract it and enjoy the complete package.
LCD Interfacing with PIC Microcontroller
Here, in this section of the article LCD Interfacing with Microcontrollers, I have shared a detailed discussion with all of you guys about designing a circuit for LCD interfaced with PIC microcontroller as well as about designing an algorithm to display ADC value on LCD using the same microcontroller i.e. PIC microcontroller.
Display ADC Value on LCD using PIC Microcontroller
In the tutorial Display ADC Value on LCD using PIC Microcontroller, I have elaborated the design of the circuit for LCD interfacing with PIC microcontroller and to display ADC values on LCD. Basically I have divided this task into two different parts. In the first part I have performed the task for Circuit Designing of LCD with PIC where as in the second part contains the code for displaying ADC values on LCD.
- You can download the Proteus simulation here by clicking on the button below.
- Download .rar file, extract it and enjoy the package.
- That was the combined version of my all of the previous tutorials related to LCD Interfacing with the three different types of microcontrollers.
So, that is all from the tutorial LCD Interfacing with Microcontrollers. I hope you enjoyed this tutorial. If you face any sort of problem regarding anything, you can ask me freely anytime without even feeling any kind of hesitation. I will try my level best to solve your issues in some better way, if possible. I will explore different software e.g. Arduino, Keil uvision3, MATLAB, NI LabVIEW etc as well as the hardware based projects, in my later tutorials and will surely share them with all of guys as well. In my next tutorial I will explain about the different amazing tools of MATLAB e.g. command window, m.file, simulink and Graphical User Interface (GUI). So, till then, Take Care 🙂