Interfacing Graphical LCD With 8051: Submitted By: Rohan Dhakad Submitted To: Ambuj Pandit
Interfacing Graphical LCD With 8051: Submitted By: Rohan Dhakad Submitted To: Ambuj Pandit
Interfacing Graphical LCD With 8051: Submitted By: Rohan Dhakad Submitted To: Ambuj Pandit
CONTENTS
1. 2. 3. 4. 5. 6. 7. 8. 9.
INTRODUCTION TO GRAPHICAL LCD BASIC FEATURES PIN DESCRIPTION GRAPHICAL LCD PINS LCD DESCRIPTION COMMANDS FOR SELECTION HOW TO GLOW A PARTICULAR PIXEL? INTERFACING LCD WITH 8051 CODING
BASIC FEATURES
Click to edit Master subtitle style
DISPLAY FORMAT :128*64 DOTS LCD MODE :STN-Yellow green-Positive-Transmissive DRIVING METHOD :1/64 Duty,1/9 Bias VIEWING ANGLE :6:00 BACKLIGHT :LED, yellow green color OUTLINE DIMENSION : 93.0(W)*70.0(H)*13.5(T) mm VIEWING ANGLE :72.0(W)*39.0(H) mm DOT SIZE :0.48*0.48 mm DOT PITCH :0.52*0.52 mm WEIGHT :75 g CONTROLLER :S6BO108(KS0108B)
PIN DESCRIPTION
RS :-REGISTER SELECT
H-Display Data L-Instruction Code
R/W:-READ/WRITE
H-Read Operation L-Write Operation
E-ENABLE SIGNAL
LCD DESCRIPTION
The graphic LCD is divided into two half: LEFT HALF RIGHT HALF The graphical LCD consists of 64 rows and 128 columns, Row is divided into 8 pages (0-7) each of 8 bits. The 128 bits of the column are divided into 2 halves each of 64 bits. These are selected from the LCD pin no. 15 and 16 i.e. CS1 and CS2.
LCD Commands
The LCDs internal controller can accept several commands and modify the display accordingly. These commands would be things like:
Clear screen Return home Decrement/Increment cursor
After writing to the LCD, it takes some time for it to complete its internal operations. During this time, it will not accept any new commands or data.
We need to insert time delay between any two
RS 0
DB1 DB0 1 D
RS 0
RS 0
This is used to select a particular column on the selected half lcd display screen. The starting address: 01000000(AC5-AC0=00000) = 40H The last address: 01111111(AC5-AC0=11111)=7FH i.e in total 40H-7FH= 64 An address is set by instruction and incremented by 1 automatically by
read or write operation of display data
RS 0
This is used to select one of the 8 pages. Address of first page:10111000 i.e B8H
Address of last page:10111111 i.e BFH 5.DISPLAY START LINE (Z ADDRESS):
RS 0
This is used to select a particular bit in a page. Address of the first bit:11000000 i.e C0H
Address of the last bit:11111111 i.e FFH In total there are 64 bits.
6. STATUS READ
BUSY=1 ; chip is executing internal operation. 0 ; chip is ready to accept any instruction. ON/OFF=1; display is off. 0; display is on. RESET=1; system is being initialized. 0; system is initialized.
First we have to display on the LCD. Set the LCD in the command mode Set Y address which chooses one of the 64 vertical rows in the half of the screen that is currently selected by CS1 or CS2. Set the X page which selects which of the 8 horizontal stripes the 8 data bits will be placed in. Write 8 bit data on the pins selected as data pins.
Suppose Y address is set to 34, X page is set to 0 and DATA PINS=0b10101010 then the picture represented in the figure below will appear on the LCD
012345678910111213 616263
ZOOMED IMAGE
Introduction to Microcontrollers
Microcontrollers
CPU + I/O + Timer(s) [+ ROM] [+ RAM] Low to moderate performance only Limited RAM space, ROM space and I/O pins EPROM version available Low chip-count to implement a small system Low-cost at large quantities
cODING
Click to edit Master subtitle style
void main(void) { unsigned char x; GDispInit (); for(;;){ GDispPixStrAt (50,32, "CITM", 1, BLACK); //Display ASCII string CITM at (x , y) =(0,20) with font space =1 and color = Black// GDispPixStrAt (50,42, "INDORE", 1, BLACK); for(x=0;x<128;x++) GDispSetPixel (x,0,BLACK); for(x=0;x<128;x++)
ZOOMED IMAGE
THANK YOU