Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
LCD Interfacing With Microcontrollers Tutorial

LCD Interfacing With Microcontrollers Tutorial

Ratings: (0)|Views: 29 |Likes:
Published by Shashank Raju

More info:

Published by: Shashank Raju on Apr 06, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

04/06/2012

pdf

text

original

 
LCD interfacing with Microcontrollers tutorial
Introduction
 The most commonly used Character based LCDs are based on Hitachi's HD44780controller or other which are compatible with HD44580. In this tutorial, we will discussabout character based LCDs, their interfacing with various microcontrollers, variousinterfaces (8-bit/4-bit), programming, special stuff and tricks you can do with thesesimple looking LCDs which can give a new look to your application.For Specs and technical information HD44780 controllerClick Here 
Pin Description
 The most commonly used LCDs found in the market today are 1 Line, 2 Line or 4 LineLCDs which have only 1 controller and support at most of 80 charachers, whereas LCDssupporting more than 80 characters make use of 2 HD44780 controllers.Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (twopins are extra in both for back-light LED connections). Pin description is shown in thetable below.
Figure 1: Character LCD type HD44780 Pin diagram
 
Pin No.
 
Name
 
Description
 Pin no. 1
VSS
 Power supply (GND)Pin no. 2
VCC
 Power supply (+5V)Pin no. 3
VEE
 Contrast adjustPin no. 4
RS
 0 = Instruction input1 = Data inputPin no. 5
R/W
 0 = Write to LCD module
 
1 = Read from LCD modulePin no. 6
EN
 Enable signalPin no. 7
D0
 Data bus line 0 (LSB)Pin no. 8
D1
 Data bus line 1Pin no. 9
D2
 Data bus line 2Pin no. 10
D3
 Data bus line 3Pin no. 11
D4
 Data bus line 4Pin no. 12
D5
 Data bus line 5Pin no. 13
D6
 Data bus line 6Pin no. 14
D7
 Data bus line 7 (MSB)
Table 1: Character LCD pins with 1 Controller
 
Pin No.
 
Name
 
Description
 Pin no. 1
D7
 Data bus line 7 (MSB)Pin no. 2
D6
 Data bus line 6Pin no. 3
D5
 Data bus line 5Pin no. 4
D4
 Data bus line 4Pin no. 5
D3
 Data bus line 3Pin no. 6
D2
 Data bus line 2Pin no. 7
D1
 Data bus line 1Pin no. 8
D0
 Data bus line 0 (LSB)Pin no. 9
EN1
 Enable signal for row 0 and 1 (1
st
controller)Pin no. 10
R/W
 0 = Write to LCD module1 = Read from LCD modulePin no. 11
RS
 0 = Instruction input1 = Data inputPin no. 12
VEE
 Contrast adjustPin no. 13
VSS
 Power supply (GND)Pin no. 14
VCC
 Power supply (+5V)Pin no. 15
EN2
 Enable signal for row 2 and 3 (2
nd
controller)
 
Pin no. 16
NC
 Not Connected
Table 2: Character LCD pins with 2 Controller
 Usually these days you will find single controller LCD modules are used more in themarket. So in the tutorial we will discuss more about the single controller LCD, theoperation and everything else is same for the double controller too. Lets take a look at thebasic information which is there in every LCD.
 
DDRAM - Display Data RAM
 Display data RAM (DDRAM) stores display data represented in 8-bit character codes. Itsextended 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 whateveryou send on the DDRAM is actually displayed on the LCD. For LCDs like 1x16, only 16characters are visible, so whatever you write after 16 chars is written in DDRAM but isnot 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 thecharacter is displayed on LCD? so the answer is CGROM. The character generator ROMgenerates 5 x 8 dot or 5 x 10 dot character patterns from 8-bit character codes (see Figure5 and Figure 6 for more details). It can generate 208 5 x 8 dot character patterns and 32 5x 10 dot character patterns. Userdefined character patterns are also available by mask-programmed ROM.

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->