Sunteți pe pagina 1din 7

INTERFACING LCD MODULE TO 8086

-Sreepada Ravikumar Asst. Prof., MVSR Engg College. At the end of this discussion you should be able to 1. Understand basics of industry standard HD44780 based LCD module operation. 2. Write pseudo code to display

MVSRECE
On the LCD module.

Introduction:
LCD or Liquid Crystal Display is an output device used in many processor based applications like calculators, Xerox machines, speedometers etc. The 8086 kit, which you use in the lab, also uses a LCD display to view the data entered into and coming out of the processor. HD44780: The HD44780 is an industry standard to maintain uniformity in the production of various LCD modules. Every manufacturer follows this standard so any application can be equipped with any LCD module produced by any manufacturer. This is like when you are to replace the power socket produced by, say anchor company, you can either go for the same company socket or a different one, say maru company. Because production of electrical and electronic equipment confirms to a standard called IEEE.

Types of LCD Modules:

2 X 16 LCD 2 Lines 16 characters per line

4 lines 40 characters per line

4 lines 20 characters per line

Pin diagram of HD44780 LCD module:

Pin No. 1 2 3 4 5 6 7 14

Notation Vss Vcc VEE Rs RW E Do D7

Description Ground +5V Contrast Adjust Register Select


Control input = 0 Data input = 1

Read Write
Read from LCD = 1 Write to LCD = 0

Enable Data Bus


LSB = Pin7 MSB = Pin14

Brief description of LCD module:


Every LCD display system will have following components: 1. Display Screen a. Single or multiple lines b. Multiple characters per line 2. Cursor a. Blinking cursor or Stable cursor b. Right moving cursor or left moving cursor 3. Each character can be displayed by using a. 5 X 10 dots or b. 5 X 7 dots 4. Interface to the processor a. 4 line interface or b. 8 line interface So there are number of possibilities coming up when you attempt to use any LCD. You have to address these prior to displaying anything. Every LCD module has a controller built inside it. This controller incorporates two RAMs a. Control RAM b. Data RAM Initially you send a series of control words each specifying in which of above 4 functionalities you want to configure the LCD device. Control words are sent to control RAM.

Once configured you transmit actual data to Data RAM which ultimately appears on the screen. Format of control words: Unlike other devices the LCD module can be configured with several control words. Each control word will be specific to each of the possible functionality. The following table will illustrate type of control word formats to be sent to Control RAM to get the assigned functionality. Here only a few control word formats are given. In practice there are more control words.
Command Function Set Enable Display/ Cursor Clear Display Move Cursor D7 D6 D5 D4 D3 D2 D1 D0 0 0 0 0 0 0 0 0 1 0 0 0 DL 0 0 1 N 1 0 F D 0 X C 0 X X B 1 X

SC RL

X = dont care bits : means they can either be 0 or 1. Function Set: DL Data Bus Line: The LCD module allows you to use either 8 bit data line or 4 bit data line DL = 1 8 bit data bus 0 4 bit data bus N No. of lines: Using this bit you can specify either you want to display characters in two lines or in a single line N = 1 2 line display 0 1 line display

F display format: In a LCD display each character is displayed by activating individual dots on the surface. You have two options: 1 5 X 10 dot matrix format ( F = 1 ) 2 5 X 7 dot matrix format ( F = 0 )

Enable Display/ Cursor: D = 1 Display on 0 Display off C = 1 Cursor on 0 Cursor off

B = 1 Cursor Blink on 0 Cursor Blink off

Move Cursor: SC = 1 0 RL = 1 0 Shift cursor on Shift cursor off Move cursor right after the display of each character Move cursor left after the display of each character

So this is about format of different control words. Once you are acquainted in this let us go for hardware connection diagram to implement the interface. Note to students: Refer to the diagram given in the class.

Port A to 8 bit data bus of LCD Port C0 to Enable bit of LCD Port C1 to RW of LCD Port C2 to RS of LCD

Procedure to interface LCD in 8 bit mode to 8086 1. Configure 8255 Port A and C in output mode = 80H Port C in BSR mode. Because you are using individual port bits to send control signals viz. E, RW and RS. a. To write to LCD i.e to display data

S-ar putea să vă placă și