SlideShare a Scribd company logo
 Rickey's World (http://www.8051projects.net/)  Register (../signup.php)  Login  (/login.php)
 Index (index.php)
 Introduction to Alphanumeric LCD (introduction.php)
 Basics of LCD (basics.php)
 LCD Commands (commands.php)
 LCD 8-bit Initialization (initialization.php)
 Checking Busy Flag of LCD (busyflag.php)
 Sending command & data to LCD (lcd-programming.php)
 Creating custom character and patters (lcd-custom-character.php)
 LCD in 4-bit Mode - Introduction (lcd-4-bit.php)
 LCD in 4-bit Mode - Programming (lcd-4-bit-programming.php)
 DDRAM - Display Data RAM
Display data RAM (DDRAM) stores display data represented in 8-bit character codes. Its extended capacity is 80 X 8 bits, or 80 characters. The area in
display data RAM (DDRAM) that is not used for display can be used as general data RAM. So whatever you send on the DDRAM is actually displayed on
the LCD. For LCDs like 1x16, only 16 characters are visible, so whatever you write after 16 chars is written in DDRAM but is not visible to the user.
Figures below will show you the DDRAM addresses of 1 Line, 2 Line and 4 Line LCDs.
Figure 2: DDRAM Address for 1 Line LCD
Figure 3: DDRAM Address for 2 Line LCD
Figure 4: DDRAM Address for 4 Line LCD
 CGROM - Character Generator ROM
Now you might be thinking that when you send an ascii value to DDRAM, how the character is displayed on LCD? so the answer is CGROM. The
character generator ROM generates 5 x 8 dot or 5 x 10 dot character patterns from 8-bit character codes (see Figure 5 and Figure 6 for more details). It
can generate 208 5 x 8 dot character patterns and 32 5 x 10 dot character patterns. Userdefined character patterns are also available by mask-
programmed ROM.
 (http://www.facebook.com/sharer.php?
u=http://www.8051projects.net&t=Rickey%27s+World+of+Microcontrollers)
 (https://twitter.com/intent/tweet?
text=Rickey%27s+World+of+Microcontrollers&url=http://www.8051projects.net)


(https://plus.google.com/share?
url=http://www.8051projects.net)
 Home
(http://www.8051projects.net/) News
(http://www.8051projects.net/news.php) Discussion Forum
(../plugins/forum/forum.php) Tutorials
(http://www.8051projects.net/microcontroller-
tutorials/)

 Downloads
(http://www.8051projects.net/download.html) LCD Pinouts
(http://www.8051projects.net/lcdpinouts.html) Jet Engine
(http://www.8051projects.net/jetengine/) Games
(http://www.8051projects.net/arcade.html) More 

Home (http://www.8051projects.net/)  Tutorials (/microcontroller-tutorials/)  LCD Interfacing tutorial (/lcd-interfacing/) Search ...
LCD Interfacing Tutorial: Basics of Alphanumeric LCD
LCDs, Character, Graphic
www.us-electronics.com
Liquid Character Displays,inverters High quality, lowest prices on line
 Table of Content 


Figure 5: LCD characters code map for 5x8 dots
Figure 6: LCD characters code map for 5x10 dots
As you can see in both the code maps, the character code from 0x00 to 0x07 is occupied by the CGRAM characters or the user defined characters. If user
want to display the fourth custom character then the code to display it is 0x03 i.e. when user send 0x03 code to the LCD DDRAM then the fourth user
created charater or patteren will be displayed on the LCD.
 CGRAM - Character Generator RAM
As clear from the name, CGRAM area is used to create custom characters in LCD. In the character generator RAM, the user can rewrite character
patterns by program. For 5 x 8 dots, eight character patterns can be written, and for 5 x 10 dots, four character patterns can be written. Later in this
tutorial i will explain how to use CGRAM area to make custom character and also making animations to give nice effects to your application.
 BF - Busy Flag
Busy Flag is an status indicator flag for LCD. When we send a command or data to the LCD for processing, this flag is set (i.e BF =1) and as soon as the
instruction is executed successfully this flag is cleared (BF = 0). This is helpful in producing and exact ammount of delay. for the LCD processing.
To read Busy Flag, the condition RS = 0 and R/W = 1 must be met and The MSB of the LCD data bus (D7) act as busy flag. When BF = 1 means LCD is busy
and will not accept next command or data and BF = 0 means LCD is ready for the next command or data to process.
 Instruction Register (IR) and Data Register (DR)
There are two 8-bit registers in HD44780 controller Instruction and Data register. Instruction register corresponds to the register where you send
commands to LCD e.g LCD shift command, LCD clear, LCD address etc. and Data register is used for storing data which is to be displayed on LCD. when
send the enable signal of the LCD is asserted, the data on the pins is latched in to the data register and data is then moved automatically to the DDRAM
and hence is displayed on the LCD.
Data Register is not only used for sending data to DDRAM but also for CGRAM, the address where you want to send the data, is decided by the
instruction you send to LCD. We will discuss more on LCD instuction set further in this tutorial.
← Previous Page (introduction.php) Index (index.php) 1 (introduction.php) 2 (basics.php) 3 (commands.php) 4 (initialization.php)
5 (busyflag.php) 6 (lcd-programming.php) 7 (lcd-custom-character.php) 8 (lcd-4-bit.php) 9 (lcd-4-bit-programming.php)
Next Page → (commands.php)
 Share it! Like it!
1 41 0 2Google + 1 1711 16


More Related Content

PPT
VGA VHDL RTL design tutorial
PPT
Microcontroller 8051
PDF
Embedded system (Chapter 2) part 2
PPT
Chp7 pic 16 f84 interfacing - copy
PPT
Assembly Language Lecture 3
PPT
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
PPTX
8051 basic programming
PDF
Ch2 microcontroller architecture
VGA VHDL RTL design tutorial
Microcontroller 8051
Embedded system (Chapter 2) part 2
Chp7 pic 16 f84 interfacing - copy
Assembly Language Lecture 3
Lec6 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Instruction...
8051 basic programming
Ch2 microcontroller architecture

What's hot (19)

PPT
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
PPT
Uart VHDL RTL design tutorial
PDF
microprocessor Questions with solution
 
PDF
C from FW
PPT
Introduction to Assembly Language
PPT
Assembly Language Lecture 2
PDF
17443 microprocessor
PPT
Chp5 pic microcontroller instruction set copy
PPTX
The 8051 microcontroller
PPTX
Lcd module interface with xilinx software using verilog
PDF
Microcontrollers 80 Marks Sample Question Paper
PDF
Microprocessorandmicroconrollermcq3 121116120640-phpapp02
PPT
Chp2 introduction to the 68000 microprocessor copy
PDF
Embedded system (Chapter 3) io_port_programming
PDF
Solution manual 8051 microcontroller by mazidi
PDF
2 Level Guitar Hero Final Report
PPT
My seminar new 28
PPTX
Embedded system (Chapter )
PPTX
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Uart VHDL RTL design tutorial
microprocessor Questions with solution
 
C from FW
Introduction to Assembly Language
Assembly Language Lecture 2
17443 microprocessor
Chp5 pic microcontroller instruction set copy
The 8051 microcontroller
Lcd module interface with xilinx software using verilog
Microcontrollers 80 Marks Sample Question Paper
Microprocessorandmicroconrollermcq3 121116120640-phpapp02
Chp2 introduction to the 68000 microprocessor copy
Embedded system (Chapter 3) io_port_programming
Solution manual 8051 microcontroller by mazidi
2 Level Guitar Hero Final Report
My seminar new 28
Embedded system (Chapter )
Ad

Viewers also liked (12)

PPT
PPTX
Instruction Set of 8051 Microcontroller
PPT
8051 instruction set
PPTX
Brainsense -Brain computer Interface
PPT
Interfacing LCD with 8051 Microcontroller
PPTX
LCD Display
PPTX
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PPTX
Microcontroller 8051 and its interfacing
PPTX
Liquid Crystal Display (LCD)
PDF
Embedded C programming based on 8051 microcontroller
PPTX
liquid crystal display
DOCX
Lcd interfacing
Instruction Set of 8051 Microcontroller
8051 instruction set
Brainsense -Brain computer Interface
Interfacing LCD with 8051 Microcontroller
LCD Display
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
Microcontroller 8051 and its interfacing
Liquid Crystal Display (LCD)
Embedded C programming based on 8051 microcontroller
liquid crystal display
Lcd interfacing
Ad

Similar to Lcd tutorial for interfacing with microcontrollers basics of alphanumeric lcd rickey's world of microcontrollers & microprocessors (20)

DOC
Moving message display
PDF
Microcontroller part 3
PDF
Radio frequency identification system
PPTX
131080111003 mci
PPTX
Track c-High speed transaction-based hw-sw coverification -eve
DOCX
Chapter 1SyllabusCatalog Description Computer structu
PPT
Introduction to Blackfin BF532 DSP
PPT
Lcd & keypad
PDF
DEF CON 23 - Rodringo Almeida - embedded system design from electronics
PPTX
ESD -DAY 24.pptx
PDF
Microcontroller part 4
PPTX
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
PPTX
LCD_Example.pptx
DOCX
Alp lcd
DOCX
SIMPLE Frequency METER using AT89c51
PDF
Expanding The Micro Blaze System
PPTX
8051_interface_LCD.pptx iii ece III ECE MPMC jntu k syllabus this is very he...
PDF
DSP Applications Using C and the TMS320C6x DSK 1st Edition Chassaing
PDF
4 bit lcd_interfacing_with_arm7_primer
PDF
4 bit lcd_interfacing_with_arm7_primer
Moving message display
Microcontroller part 3
Radio frequency identification system
131080111003 mci
Track c-High speed transaction-based hw-sw coverification -eve
Chapter 1SyllabusCatalog Description Computer structu
Introduction to Blackfin BF532 DSP
Lcd & keypad
DEF CON 23 - Rodringo Almeida - embedded system design from electronics
ESD -DAY 24.pptx
Microcontroller part 4
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
LCD_Example.pptx
Alp lcd
SIMPLE Frequency METER using AT89c51
Expanding The Micro Blaze System
8051_interface_LCD.pptx iii ece III ECE MPMC jntu k syllabus this is very he...
DSP Applications Using C and the TMS320C6x DSK 1st Edition Chassaing
4 bit lcd_interfacing_with_arm7_primer
4 bit lcd_interfacing_with_arm7_primer

Recently uploaded (20)

PDF
Well-logging-methods_new................
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
web development for engineering and engineering
PPTX
Geodesy 1.pptx...............................................
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Sustainable Sites - Green Building Construction
PDF
Digital Logic Computer Design lecture notes
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
additive manufacturing of ss316l using mig welding
PPT
Mechanical Engineering MATERIALS Selection
PDF
composite construction of structures.pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
UNIT 4 Total Quality Management .pptx
Well-logging-methods_new................
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
CH1 Production IntroductoryConcepts.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Model Code of Practice - Construction Work - 21102022 .pdf
web development for engineering and engineering
Geodesy 1.pptx...............................................
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Lecture Notes Electrical Wiring System Components
Sustainable Sites - Green Building Construction
Digital Logic Computer Design lecture notes
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
additive manufacturing of ss316l using mig welding
Mechanical Engineering MATERIALS Selection
composite construction of structures.pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
UNIT 4 Total Quality Management .pptx

Lcd tutorial for interfacing with microcontrollers basics of alphanumeric lcd rickey's world of microcontrollers & microprocessors

  • 1.  Rickey's World (http://www.8051projects.net/)  Register (../signup.php)  Login  (/login.php)  Index (index.php)  Introduction to Alphanumeric LCD (introduction.php)  Basics of LCD (basics.php)  LCD Commands (commands.php)  LCD 8-bit Initialization (initialization.php)  Checking Busy Flag of LCD (busyflag.php)  Sending command & data to LCD (lcd-programming.php)  Creating custom character and patters (lcd-custom-character.php)  LCD in 4-bit Mode - Introduction (lcd-4-bit.php)  LCD in 4-bit Mode - Programming (lcd-4-bit-programming.php)  DDRAM - Display Data RAM Display data RAM (DDRAM) stores display data represented in 8-bit character codes. Its extended capacity is 80 X 8 bits, or 80 characters. The area in display data RAM (DDRAM) that is not used for display can be used as general data RAM. So whatever you send on the DDRAM is actually displayed on the LCD. For LCDs like 1x16, only 16 characters are visible, so whatever you write after 16 chars is written in DDRAM but is not visible to the user. Figures below will show you the DDRAM addresses of 1 Line, 2 Line and 4 Line LCDs. Figure 2: DDRAM Address for 1 Line LCD Figure 3: DDRAM Address for 2 Line LCD Figure 4: DDRAM Address for 4 Line LCD  CGROM - Character Generator ROM Now you might be thinking that when you send an ascii value to DDRAM, how the character is displayed on LCD? so the answer is CGROM. The character generator ROM generates 5 x 8 dot or 5 x 10 dot character patterns from 8-bit character codes (see Figure 5 and Figure 6 for more details). It can generate 208 5 x 8 dot character patterns and 32 5 x 10 dot character patterns. Userdefined character patterns are also available by mask- programmed ROM.  (http://www.facebook.com/sharer.php? u=http://www.8051projects.net&t=Rickey%27s+World+of+Microcontrollers)  (https://twitter.com/intent/tweet? text=Rickey%27s+World+of+Microcontrollers&url=http://www.8051projects.net)   (https://plus.google.com/share? url=http://www.8051projects.net)  Home (http://www.8051projects.net/) News (http://www.8051projects.net/news.php) Discussion Forum (../plugins/forum/forum.php) Tutorials (http://www.8051projects.net/microcontroller- tutorials/)   Downloads (http://www.8051projects.net/download.html) LCD Pinouts (http://www.8051projects.net/lcdpinouts.html) Jet Engine (http://www.8051projects.net/jetengine/) Games (http://www.8051projects.net/arcade.html) More   Home (http://www.8051projects.net/)  Tutorials (/microcontroller-tutorials/)  LCD Interfacing tutorial (/lcd-interfacing/) Search ... LCD Interfacing Tutorial: Basics of Alphanumeric LCD LCDs, Character, Graphic www.us-electronics.com Liquid Character Displays,inverters High quality, lowest prices on line  Table of Content   
  • 2. Figure 5: LCD characters code map for 5x8 dots Figure 6: LCD characters code map for 5x10 dots As you can see in both the code maps, the character code from 0x00 to 0x07 is occupied by the CGRAM characters or the user defined characters. If user want to display the fourth custom character then the code to display it is 0x03 i.e. when user send 0x03 code to the LCD DDRAM then the fourth user created charater or patteren will be displayed on the LCD.  CGRAM - Character Generator RAM As clear from the name, CGRAM area is used to create custom characters in LCD. In the character generator RAM, the user can rewrite character patterns by program. For 5 x 8 dots, eight character patterns can be written, and for 5 x 10 dots, four character patterns can be written. Later in this tutorial i will explain how to use CGRAM area to make custom character and also making animations to give nice effects to your application.  BF - Busy Flag Busy Flag is an status indicator flag for LCD. When we send a command or data to the LCD for processing, this flag is set (i.e BF =1) and as soon as the instruction is executed successfully this flag is cleared (BF = 0). This is helpful in producing and exact ammount of delay. for the LCD processing. To read Busy Flag, the condition RS = 0 and R/W = 1 must be met and The MSB of the LCD data bus (D7) act as busy flag. When BF = 1 means LCD is busy
  • 3. and will not accept next command or data and BF = 0 means LCD is ready for the next command or data to process.  Instruction Register (IR) and Data Register (DR) There are two 8-bit registers in HD44780 controller Instruction and Data register. Instruction register corresponds to the register where you send commands to LCD e.g LCD shift command, LCD clear, LCD address etc. and Data register is used for storing data which is to be displayed on LCD. when send the enable signal of the LCD is asserted, the data on the pins is latched in to the data register and data is then moved automatically to the DDRAM and hence is displayed on the LCD. Data Register is not only used for sending data to DDRAM but also for CGRAM, the address where you want to send the data, is decided by the instruction you send to LCD. We will discuss more on LCD instuction set further in this tutorial. ← Previous Page (introduction.php) Index (index.php) 1 (introduction.php) 2 (basics.php) 3 (commands.php) 4 (initialization.php) 5 (busyflag.php) 6 (lcd-programming.php) 7 (lcd-custom-character.php) 8 (lcd-4-bit.php) 9 (lcd-4-bit-programming.php) Next Page → (commands.php)  Share it! Like it! 1 41 0 2Google + 1 1711 16 