The document discusses interfacing an LCD to an 8051 microcontroller. It describes the LCD pins including Enable, RW, RS, and data pins. It explains the LCD has two 8-bit registers for instructions and data. The LCD also has a display data RAM to store character codes and a character generator RAM. It notes the busy flag must be cleared before accepting a new instruction. The document provides information needed to understand and interface an LCD.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
20 views
Microcontroller Lab 09
The document discusses interfacing an LCD to an 8051 microcontroller. It describes the LCD pins including Enable, RW, RS, and data pins. It explains the LCD has two 8-bit registers for instructions and data. The LCD also has a display data RAM to store character codes and a character generator RAM. It notes the busy flag must be cleared before accepting a new instruction. The document provides information needed to understand and interface an LCD.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7
Lab#08
Interfacing LCD to 8051 Microcontroller
Lab#08 Interfacing LCD to 8051 Microcontroller Understanding LCD (pins) ❖ Enable (Latch data) ❖ RW=0 for Write ❖ High to Low edge is needed to ❖ RW=1 for Read latch data (write) ❖ Low to high edge (Read) ❖ Register Select (RS) ❖ Rs=0 Command register selected ❖ Rs=1 Data register selected ❖ 8 data pins (DB0-DB7) ❖ Bi-directional ❖ Data and Command ❖ Alphanumeric Characters are send in ASCII format ❖ Vo= Contrast control Pin Understanding LCD (inside) 01) Registers ❖Two 8-bit registers ❖Instruction Register (IR) and Data Register (DR) ❖These register can be selected by Register Select (RS) pin of LCD Understanding LCD (inside) 02) Display Data RAM (DDRAM) ❖ Stores data to be display, represented in 8-bit character codes ❖ Capacity is 80 character (bytes)
❖ DDRAM Address layout of a 2x16 LCD
Line 1 Line 2
03) Character Generator RAM (CGRAM)
Understanding LCD (inside) 04)Busy Flag (BF) ❖When BF=1 Lcd is in internal operation mode and can’t accept next instruction ❖It is output to DB7 pin ❖When RS=0 and RW=1 Read busy flag ❖The next instruction must be written after insuring that BF=0 ❖See manual page#55 LCD’s internal control accept several commands and modify the display accordingly. ❖Must write RET at the end of each subroutine
❖Lcall and Scall
❖Jb bit, label (instruction) again: jb p1.7,again if p1.7=1 it will jump to label.