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
Tutorial on Interfacing Lcd

Tutorial on Interfacing Lcd

Ratings: (0)|Views: 16 |Likes:
Published by Abhijeet Rathi

More info:

Published by: Abhijeet Rathi on Dec 24, 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

06/05/2014

pdf

text

original

 
 
TUTORIAL ONINTERFACING LCD
EMBEDDED SYSTEMSSPRING 2009
 
This tutorial explains how to interface Liquid Crystal Display (LCD) to LPC2148.The interfacing of LCD is explained using HD44780U as the Dot Matrix Liquid CrystalDisplay Controller/Driver. HD44780U is a programmable chip for various LCD displaycontrol functions. It drives the dot-matrix liquid crystal display. It can be configuredunder the control of a microprocessor.In our example, we will connect the LCD controller to the LPC2148 microcontroller. Wewill use the GPIO pins of LPC2148 for the purpose of connecting the LCD controller.We will then write a program to output some specific values to the GPIO pins (whatvalues to write – we will discuss about them shortly). This program will be executed inthe ARM processor of the LPC2148 microcontroller. The LCD controller, on receivingthe bits sent over the GPIO pins, will display characters on the LCD and perform othercontrol functions.So what are the specific values that should be output to the GPIO pins? This is what wewill learn in the next few sections.
Pins in the LCD Controller
Among the pins available in a LCD controller, the following are being used for thepurpose of interfacing. Their explanation follows.
 
 1.
 
DB0 to DB7 – the data bus pins. These signals can be used to send 8 bits of datafrom the microcontroller to the LCD controller or from the LCD controller to themicrocontroller. DB7 can be used a busy flag also. More about Bust flag later.2.
 
The R/W signal selects between a Read and a Write operation. If R/W is equal to0, a Write operation will be performed. For a Write operation, DB0 to DB7 willbe used to send data from the microcontroller to the LCD controller. If R/W isequal to 1, a Read operation will be performed. For a Read operation, DB0 toDB7 will be used to send data from the LCD controller to the microcontroller.3.
 
Two of the registers available in the LCD controller are the Instruction Registerand the Data Register. More about how these registers are used later. The RSsignal selects between these two registers. RS equal to 0 selects the Instructionregister for a Write operation. This means that if RS=0 and R/W=0, the data sentover DB0 to DB7 will be put in the Instruction register. RS equal to 0 selects theBusy Flag for Read operation. This means that if RS=0 and R/W=1, the value inthe Busy Flag will be sent over DB7. RS equal to 1 selects the Data register forRead and Write operation. This means that if RS=1 and R/W=0, the data sent overDB0 to DB7 will be put in the Data register. If RS=1 and R/W=1, the value in theData register will be sent over DB0 to DB7.4.
 
The E signal is used to start data read or write. When the data is sent to the datapins of the LCD, a high to low pulse must be applied to the E signal so that theLCD latches the data present at its pins. Similarly a high to low pulse must beprovided to the E signal during a Read operation.

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)//-->