Vous êtes sur la page 1sur 6

 Home  Tutorials  LCD Interfacing tutorial

LCD Interfacing Tutorial: Commands and Instructions

 Table of Content 

 Index
 Introduction to Alphanumeric LCD
 Basics of LCD
 LCD Commands
 LCD 8-bit Initialization
 Checking Busy Flag of LCD
 Sending command & data to LCD
 Creating custom character and patters
 LCD in 4-bit Mode - Introduction
 LCD in 4-bit Mode - Programming

Commands and Instruction set


Only the instruction register (IR) and the data register (DR) of the LCD can be controlled by the MCU. Before starting the internal operation of the LCD, control
information is temporarily stored into these registers to allow interfacing with various MCUs, which operate at di erent speeds, or various peripheral control devices.
The internal operation of the LCD is determined by signals sent from the MCU. These signals, which include register selection signal (RS), read/write signal (R/W), and
the data bus (DB0 to DB7), make up the LCD instructions (Table 3). There are four categories of instructions that:

Designate LCD functions, such as display format, data length, etc.

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Set internal RAM addresses
Perform data transfer with internal RAM
Perform miscellaneous functions

Table 3: Command and Instruction set for LCD type HD44780

Although looking at the table you can make your own commands and test them. Below is a breif list of useful commands which are used frequently while working on
the LCD.

No. Instruction Hex Decimal

1 Function Set: 8-bit, 1 Line, 5x7 Dots 0x30 48

2 Function Set: 8-bit, 2 Line, 5x7 Dots 0x38 56

3 Function Set: 4-bit, 1 Line, 5x7 Dots 0x20 32

4 Function Set: 4-bit, 2 Line, 5x7 Dots 0x28 40

5 Entry Mode 0x06 6

6 Display o Cursor o 0x08 8


(clearing display without clearing DDRAM content)

7 Display on Cursor on 0x0E 14

8 Display on Cursor o 0x0C 12

9 Display on Cursor blinking 0x0F 15

10 Shift entire display left 0x18 24

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
No. Instruction Hex Decimal

11 Shift entire display right 0x1C 30

12 Move cursor left by one character 0x10 16

13 Move cursor right by one character 0x14 20

14 Clear Display (also clear DDRAM content) 0x01 1

15 Set DDRAM address or coursor position on display 0x80 + address* 128 + address*

16 Set CGRAM address or set pointer to CGRAM location 0x40 + address** 64 + address**

Table 4: Frequently used commands and instructions for LCD

* DDRAM address given in LCD basics section see Figure 2,3,4


** CGRAM address from 0x00 to 0x3F, 0x00 to 0x07 for char1 and so on..

The table above will help you while writing programs for LCD. But after you are done testing with the table 4, i recommend you to use table 3 to get more grip on
working with LCD and trying your own commands. In the next section of the tutorial we will see the initialization with some of the coding examples in C as well as
assembly.

← Previous Page Index 1 2 3 4 5 6 7 8 9 Next Page →

Share it! Like it!

 
Post A Question Share A Project

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
 Conversation Forum Activity

 Name  Email Posted By ExperimenterUK  10/22/2019

 Type your message here ...  max 7219 not giving serial out data
Thanks for support,s_dinesh40@yahoo.comThanks.Afte...
   

Posted By wimac  10/21/2019


ExperimenterUK  10/12/2019
Log in.. then post your code in the 8051 forum  max 7219 not giving serial out data
I’ve been following this thread and looking at the...

Bhadra Sajikumar  10/12/2019


i am doing a countdown timer with 8051 for my project, Posted By s_dinesh40@yahoo.com  10/20/2019
unfortunately our professor had to take a leave of absence
before he could teach us most of it.. can someone explain the  max 7219 not giving serial out data
.asm code of it for me? Thanks for support,

Nathaniel  9/23/2019
Posted By s_dinesh40@yahoo.com  10/20/2019
I am doing a project for my schools wireless security system with
cameras,sensors and spot lights using 8051 micro controller,
 max 7219 not giving serial out data
could you help me out with the design and its source code.
sir, when i on display ,sometime 3rd display is no...

Recent Downloads Comments Members Posted By s_dinesh40@yahoo.com  10/20/2019

 max 7219 not giving serial out data


sir, when i on display ,sometime 3rd display is no...
 Downloads

Automatic Railway Gate Control by: Nimar & Pawandeep Kaur in: 8051
Posted By ExperimenterUK  10/20/2019
Projects

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
 5/31/2018
 max 7219 not giving serial out data
Your code seems okay on my simulationTry my code o...
Yet Another DTMF Controlled Robot by: Parambir, Harman, Pragati,
shikha, Manpreet in: 8051 Projects
 5/19/2017
Posted By s_dinesh40@yahoo.com  10/19/2019
Simple 3 Digit Temperature Meter by: Rakesh Suthar in: PIC Projects
 max 7219 not giving serial out data
 7/5/2014
please nd video attachment. 3rd & 4th displa...

Electronic Voting machine with Managed Control Unit (Project Report


Included) by: Shivani, Geetika Gupta, Vibhore Aggarwal, Megha Singh in:
Posted By s_dinesh40@yahoo.com  10/19/2019
8051 Projects
 5/17/2014
 max 7219 not giving serial out data
sir, 3rd and 4th dot matrix display ickering, ...
LED Scrolling message Display using 8051 by: Pratik Suthar in: 8051
Projects
 5/8/2014
Posted By ExperimenterUK  10/18/2019

Online  max 7219 not giving serial out data


Hopefully you understand some of the program.Which...
Guests: 55, Members: 0 ...

most ever online: 182184 Posted By s_dinesh40@yahoo.com  10/17/2019


(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM
 max 7219 not giving serial out data
Members: 38097 please explain,
Newest member: ilylily07

Trending Topics

mt9d111 source code   timer example 8051   Digital Lock project   96.3Mhz
FM transmitter no coil   Serial-Menu architecture

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
rewriterule
     friends check   PIC i2c tutorial   LabVIEW

Advanced Programming Techniques   gr 1   combat robot   preparing stable

sd card
nano-structures      sending sms   ds1621 sample code
  Neural Networks:Algorithms and Applications   temperature stability   32-
bit multiply assembly   8051 Mazidi ebook   digital control techniques   
more tags

Rickey's World © 2014       

Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD

Vous aimerez peut-être aussi