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 different 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.
  • 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
1Function Set: 8-bit, 1 Line, 5x7 Dots0x3048
2Function Set: 8-bit, 2 Line, 5x7 Dots0x3856
3Function Set: 4-bit, 1 Line, 5x7 Dots0x2032
4Function Set: 4-bit, 2 Line, 5x7 Dots0x2840
5Entry Mode0x066
6Display off Cursor off
(clearing display without clearing DDRAM content)
7Display on Cursor on0x0E14
8Display on Cursor off0x0C12
9Display on Cursor blinking0x0F15
10Shift entire display left0x1824
11Shift entire display right0x1C30
12Move cursor left by one character0x1016
13Move cursor right by one character0x1420
14Clear Display (also clear DDRAM content)0x011
15Set DDRAM address or coursor position on display0x80 + address*128 + address*
16Set CGRAM address or set pointer to CGRAM location0x40 + 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.

Share it! Like it!


Mon Nov 23 2015, 06:32 PM
طريقة عمل مشروع dtmf على الماتلاب بالتفصيل
Mon Nov 23 2015, 02:26 PM
Muhammad Naveed kayani
principal of Electrical circuits 8th Edition, by Thomas L. Floyd , Prentice Hall please send me ... ??
Sun Nov 22 2015, 03:20 AM
@Naresh Jain ..hex file for what ?
Thu Nov 19 2015, 04:16 PM
Naresh Jain
can u arrange hex file
Thu Nov 19 2015, 04:14 PM
Naresh Jain
where is PCB file ? there is error.
Thu Nov 19 2015, 02:25 PM
hello all
Thu Nov 19 2015, 03:31 AM
@Bhaveen Lodaya.. can you rejoin as a new user
Wed Nov 18 2015, 03:39 PM
Bhaveen Lodaya
@Ajay... I forgot my username and password as I haven't used this site for a very long time. Please help me reset it. I am not receiving the password reset emails too.
Sun Nov 15 2015, 04:31 AM
@Phil, please check my PM and reply.
Thu Nov 12 2015, 08:50 PM
@Ajay.. PM sent.. just routine stuff



Sat Nov 21 2015, 09:19 PM
Sat Nov 21 2015, 07:05 PM
Mon Nov 16 2015, 11:49 PM
Wed Nov 11 2015, 09:02 PM
Wed Nov 11 2015, 09:20 AM
Tue Nov 10 2015, 11:12 PM
Thu Nov 05 2015, 06:27 PM
Thu Nov 05 2015, 01:03 PM


Guests: 25, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37715
Newest member: emreaydogmus06
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Nov 12 2015, 08:58 PM
Your problem may be the mismatch of a 3.7 volt mic...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Nov 12 2015, 04:21 PM
Length of tracks or wires depends on drive strengt...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Nov 12 2015, 04:13 PM
Sure, we will be interested in discussing your pro...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Nov 12 2015, 04:09 PM
For AC devices, power = area under the curve so if...
gauravkothari23 Avatar
Posted By gauravkothari23
Wed Nov 11 2015, 09:10 PM
HI all,I am making a small project in which i am u...
csedwards1965 Avatar
Posted By csedwards1965
Tue Nov 10 2015, 11:20 PM
Hello.I am struggling to get the project lab going...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Nov 06 2015, 01:21 AM
Mains fan motors are generally meant to only run a...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Nov 06 2015, 01:12 AM
The key thing is the length of the interrupt code....
bobster Avatar
Posted By bobster
Thu Nov 05 2015, 06:39 PM
Hi all,I am using an atmel 89c5131 microcontroller...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Nov 05 2015, 12:20 PM
8086 is a microprocessor with only a CPU. It does ...