Image may be NSFW. Clik here to view. ![]() |
Interfacing LCD with ARM Microcontroller |
Interfacing LCD with Microcontrollers holds a very important place in interfacing tutorials since LCD's help us to achieve a cheap Embedded Design with vital information display. This tutorial teaches you about designing and programming of LCD using LPC2124 Microcontroller.
16x2 LCD:
Image may be NSFW. Clik here to view. ![]() |
16x2 LCD Pin diagram |
This type of LCD is very common consists of 16 columns and two rows. The pin diagram of a 16x2 LCD was shown in the above diagram where DB0 - DB7 forms the data pins, RS - Register select, En- Enable and RW - Read/Write. The detailed pin functions was given in the table below.
Image may be NSFW. Clik here to view. ![]() |
Pin description |
Operation of LCD takes place by means of two inputs one is command and the other one is data. Command makes the LCD to perform actions such as cursor blink, cursor position , LCD on/off etc. Whereas Data will give a specific character to be displayed in the LCD screen.
COMMANDS FOR LCD:
The below table gives the basic commands and its respective operation a LCD will perform.
Image may be NSFW. Clik here to view. ![]() |
Command table |
DATA/COMMAND TRANSMISSION TO THE LCD:
The data and command transmission to the LCD will flow through the pins DB0-DB7, however the state of the RS pin will decide that the transmitted byte whether a data or command.
- RS = 0 for command transmission.
- RS = 1 for Data Transmission.
- Then pulse the enable pin from high to low that is EN=1 to EN=0 with specific time delay between. Note that pulsing enable have to done for both data and Command transmission.
CODE:
The below code was built using Keil uVision 4 IDE. In the below code a a word "GADGETRONICX" was displayed and then made to scroll continuously using the command "0x18".
|
Like this tutorial? Share this with others through social sites and do not forget to follow or subscribe for more of these to your timeline/inbox.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.![]()
Image may be NSFW.Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.