SlideShare a Scribd company logo
Dr. Vikas Dongre
HOD Electronics
Government Polytechnic Washim
Maharashtra, India
dongrevj1@gmail.com
With KEIL program and
Proteus Simulation
LCD is finding widespread use replacing LEDs
􀂾 The declining prices of LCD, descent looking, less power consumption
􀂾 The ability to display numbers, characters, and graphics
􀂾 Incorporation of a refreshing controller into the LCD, thereby relieving the
CPU of the task of refreshing the LCD
􀂾 Ease of programming for characters and graphics
Seven Segment Display
Liquid Crystal Display (LCD)
Liquid Crystal Display
Lcd interfaing using 8051 and assambly language programming
LCD Block DiagramLCD Char 5x7 Matrix
16x2 LCD DISPLAY
Interfacing Diagram
Pin Symbol I/O Description
1 Vss - Ground
2 Vdd - +5V Power Supply
3 Vee - Contrast control power supply
4 RS Register select
RS=0 Command register
RS=1 Data register
5 R/W I R- Write/ W-Read
6 E I Enable
7-14 DB0-DB7 I/O Data Bus
16x2 LCD Display
Working of LCD Display controller
1.Command Register: Controls the working of LCD Controller
2.Data Register: Used to store the data to be displayed on LCD
3.Alphanumeric and graphic Character set memory for various
languages
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
1 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
16x2 LCD DISPLAY ADDRESSES
2 ROWS
16 COLUMNS
Co
de
Command to LCD Instruction
Register
01 Clear display screen
02 Return home
04 Decrement cursor (shift cursor to
left)
06 Increment cursor (shift cursor to
right)
05 Shift display right
07 Shift display left
08 Display off, cursor off
0A Display off, cursor on
0C Display on, cursor off
Co
de
Command to LCD Instruction
Register
0E Display on, cursor blinking
10 Shift cursor position to left
14 Shift cursor position to right
18 Shift the entire display to the left
1C Shift the entire display to the right
80 Force cursor to beginning to 1st
line
C0 Force cursor to beginning to 2nd
line
38 2 lines and 5x7 matrix
Algorithm
Start
Initialize LCD by providing various
commands to Control register
Send data to be
displayed on Data
register byte by byte
Stop
COMNWRT: ;send command to LCD
MOV P0, A ;copy reg A to port 0
CLR RS ;RS=0 for command Register
CLR RW ;R/W=0 for write
SETB E ;E=1 for high pulse
CLR E ;E=0 for H-to-L pulse
ACALL DELAY ;give LCD some time
RET
Subroutine for
Writing in Command Register
DATAWRT: ;send command to LCD
MOV P0,A ;copy reg A to port 1
SETB RS ;RS=1 for Data Register
CLR RW ;R/W=0 for write
SETB E ;E=1 for high pulse
CLR E ;E=0 for H-to-L pulse
ACALL DELAY ;give LCD some time
RET
Subroutine for
Writing in Data Register
ORG 0000
MOV A,#38H ;INIT. LCD 2 LINES, 5X7 MATRIX
ACALL COMNWRT ;call command subroutine
MOV A,#0EH ;display on, cursor on
ACALL COMNWRT ;call command subroutine
MOV A,#01 ;clear LCD
ACALL COMNWRT ;call command subroutine
MOV A,#06H ;shift cursor right
ACALL COMNWRT ;call command subroutine
MOV A,#86H ;cursor at line 1, pos. 6
ACALL COMNWRT ;call command subroutine
Program to display the word “WORLD” on 16x2 LCD Display
Initialize Control register
MOV A,#“W" ;display letter W
ACALL DATAWRT ;call display subroutine
MOV A,#“O" ;display letter O
ACALL DATAWRT ;call display subroutine
MOV A,#“R" ;display letter R
ACALL DATAWRT ;call display subroutine
MOV A,#“L" ;display L
ACALL DATAWRT ;call display subroutine
MOV A,#“D" ;display D
ACALL DATAWRT ;call display subroutine
Send data to be
displayed on Data
register
COMNWRT: ;send command to LCD
MOV P0,A ;copy reg A to port 1
CLR P1.0 ;RS=0 for command
CLR P1.1 ;R/W=0 for write
SETB P1.2 ;E=1 for high pulse
CLR P1.2 ;E=0 for H-to-L pulse
ACALL DELAY ;give LCD some time
RET
COMMAND WORD SUBROUTINE
DATAWRT: ;write data to LCD
MOV P0,A ;copy reg A to port 1
SETB P1.0 ;RS=1 for DATA
CLR P1.1 ;R/W=0 for write
SETB P1.2 ;E=1 for high pulse
CLR P1.2 ;E=0 for H-to-L pulse
ACALL DELAY ;give LCD some time
RET
DATA WORD SUBROUTINE
DELAY: MOV R3,#255 ;OUTER COUNT
HERE2: MOV R4,#255 ;INNER COUNT
HERE: DJNZ R4,HERE ;stay until R4 becomes 0
DJNZ R3,HERE2
RET
END
DELAY SUBROUTINE
Output with KEIL program and Proteus Simulation
Thank you !!!
Dr. Vikas Dongre
HOD Electronics
Government Polytechnic Washim
dongrevj1@gmail.com
Ad

More Related Content

What's hot (20)

Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Pantech ProLabs India Pvt Ltd
 
LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
Sudhanshu Janwadkar
 
Sensor interfacing in 8051
Sensor interfacing in 8051Sensor interfacing in 8051
Sensor interfacing in 8051
Irfan Ahmad
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
Sudhanshu Janwadkar
 
Seven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdfSeven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdf
Srikrishna Thota
 
PIC timer programming
PIC timer programmingPIC timer programming
PIC timer programming
Akash Puri
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
Sudhanshu Janwadkar
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
Gopal Krishna Murthy C R
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
Pantech ProLabs India Pvt Ltd
 
Instruction Set of 8051 Microcontroller
Instruction Set of 8051 MicrocontrollerInstruction Set of 8051 Microcontroller
Instruction Set of 8051 Microcontroller
Multisoft Virtual Academy
 
8086 pin details
8086 pin details8086 pin details
8086 pin details
AJAL A J
 
Lcd interfacing with microprocessor 8051
Lcd interfacing with microprocessor 8051Lcd interfacing with microprocessor 8051
Lcd interfacing with microprocessor 8051
Hasnain Yaseen
 
Microprocessor based Temperature Controller
Microprocessor based Temperature ControllerMicroprocessor based Temperature Controller
Microprocessor based Temperature Controller
Revanth Reddy
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
UshaRani289
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
KanchanPatil34
 
Key board interfacing with 8051
Key board interfacing with 8051Key board interfacing with 8051
Key board interfacing with 8051
DominicHendry
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
Sudhanshu Janwadkar
 
List of 8085 programs
List of 8085 programsList of 8085 programs
List of 8085 programs
ASHOKA INSTITUTE OF TECHNOLOGY & MANAGEMENT,VARANASI,U.P.
 
pin-diagram-details-of-8086-microprocessor
pin-diagram-details-of-8086-microprocessorpin-diagram-details-of-8086-microprocessor
pin-diagram-details-of-8086-microprocessor
barsharoy19
 
TRAFFIC LIGHT CONTROL SYSTEM USING 8085 MICROPROCESSOR
TRAFFIC LIGHT CONTROL SYSTEM USING 8085 MICROPROCESSORTRAFFIC LIGHT CONTROL SYSTEM USING 8085 MICROPROCESSOR
TRAFFIC LIGHT CONTROL SYSTEM USING 8085 MICROPROCESSOR
Subash Sambath Kumar
 
Sensor interfacing in 8051
Sensor interfacing in 8051Sensor interfacing in 8051
Sensor interfacing in 8051
Irfan Ahmad
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
Sudhanshu Janwadkar
 
Seven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdfSeven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdf
Srikrishna Thota
 
PIC timer programming
PIC timer programmingPIC timer programming
PIC timer programming
Akash Puri
 
8086 pin details
8086 pin details8086 pin details
8086 pin details
AJAL A J
 
Lcd interfacing with microprocessor 8051
Lcd interfacing with microprocessor 8051Lcd interfacing with microprocessor 8051
Lcd interfacing with microprocessor 8051
Hasnain Yaseen
 
Microprocessor based Temperature Controller
Microprocessor based Temperature ControllerMicroprocessor based Temperature Controller
Microprocessor based Temperature Controller
Revanth Reddy
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
UshaRani289
 
Key board interfacing with 8051
Key board interfacing with 8051Key board interfacing with 8051
Key board interfacing with 8051
DominicHendry
 
pin-diagram-details-of-8086-microprocessor
pin-diagram-details-of-8086-microprocessorpin-diagram-details-of-8086-microprocessor
pin-diagram-details-of-8086-microprocessor
barsharoy19
 
TRAFFIC LIGHT CONTROL SYSTEM USING 8085 MICROPROCESSOR
TRAFFIC LIGHT CONTROL SYSTEM USING 8085 MICROPROCESSORTRAFFIC LIGHT CONTROL SYSTEM USING 8085 MICROPROCESSOR
TRAFFIC LIGHT CONTROL SYSTEM USING 8085 MICROPROCESSOR
Subash Sambath Kumar
 

Similar to Lcd interfaing using 8051 and assambly language programming (20)

Lcd interfacing1
Lcd interfacing1Lcd interfacing1
Lcd interfacing1
Monica Gunjal
 
Applications of microcontroller(8051)
Applications of microcontroller(8051) Applications of microcontroller(8051)
Applications of microcontroller(8051)
vijaydeepakg
 
Topviewsimulator
TopviewsimulatorTopviewsimulator
Topviewsimulator
Rashmi
 
Lcd interface with atmega32 avr best.ppt
Lcd interface with atmega32 avr best.pptLcd interface with atmega32 avr best.ppt
Lcd interface with atmega32 avr best.ppt
SoumyaGupta836456
 
131080111003 mci
131080111003 mci131080111003 mci
131080111003 mci
jokersclown57
 
LCD interfacing
LCD interfacingLCD interfacing
LCD interfacing
Kshitij Wagle
 
Alp lcd
Alp lcdAlp lcd
Alp lcd
Caleb Joshua
 
Moving message display
Moving message displayMoving message display
Moving message display
viraj1989
 
Lcd interfacing
Lcd interfacingLcd interfacing
Lcd interfacing
AshuKaranam
 
LCD_Example.pptx
LCD_Example.pptxLCD_Example.pptx
LCD_Example.pptx
julioalexanderaguila
 
Lcd & keypad
Lcd & keypadLcd & keypad
Lcd & keypad
Izwanizam Yahaya
 
Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers final
SARITHA REDDY
 
Microcontroladores: El microcontrolador 8051 con LCD 16x2
Microcontroladores: El microcontrolador 8051 con LCD 16x2Microcontroladores: El microcontrolador 8051 con LCD 16x2
Microcontroladores: El microcontrolador 8051 con LCD 16x2
SANTIAGO PABLO ALBERTO
 
Real Time Embedded System
Real Time Embedded SystemReal Time Embedded System
Real Time Embedded System
Vrushali Lanjewar
 
LCD WITH 8051.docx
LCD WITH 8051.docxLCD WITH 8051.docx
LCD WITH 8051.docx
bhattparthiv23
 
MPMC Architecture of 8085 Microprocessor and Programming.pptx
MPMC Architecture of 8085 Microprocessor and Programming.pptxMPMC Architecture of 8085 Microprocessor and Programming.pptx
MPMC Architecture of 8085 Microprocessor and Programming.pptx
kaustubhshedbalkar1
 
_LCD display-mbed.pdf
_LCD display-mbed.pdf_LCD display-mbed.pdf
_LCD display-mbed.pdf
vidhyalakshmi153619
 
Lcd tutorial
Lcd tutorialLcd tutorial
Lcd tutorial
Sujan Heuju
 
Microcontroller part 4
Microcontroller part 4Microcontroller part 4
Microcontroller part 4
Keroles karam khalil
 
08_lcd.pdf
08_lcd.pdf08_lcd.pdf
08_lcd.pdf
ssusera55490
 
Applications of microcontroller(8051)
Applications of microcontroller(8051) Applications of microcontroller(8051)
Applications of microcontroller(8051)
vijaydeepakg
 
Topviewsimulator
TopviewsimulatorTopviewsimulator
Topviewsimulator
Rashmi
 
Lcd interface with atmega32 avr best.ppt
Lcd interface with atmega32 avr best.pptLcd interface with atmega32 avr best.ppt
Lcd interface with atmega32 avr best.ppt
SoumyaGupta836456
 
Moving message display
Moving message displayMoving message display
Moving message display
viraj1989
 
Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers final
SARITHA REDDY
 
Microcontroladores: El microcontrolador 8051 con LCD 16x2
Microcontroladores: El microcontrolador 8051 con LCD 16x2Microcontroladores: El microcontrolador 8051 con LCD 16x2
Microcontroladores: El microcontrolador 8051 con LCD 16x2
SANTIAGO PABLO ALBERTO
 
MPMC Architecture of 8085 Microprocessor and Programming.pptx
MPMC Architecture of 8085 Microprocessor and Programming.pptxMPMC Architecture of 8085 Microprocessor and Programming.pptx
MPMC Architecture of 8085 Microprocessor and Programming.pptx
kaustubhshedbalkar1
 
Ad

More from Vikas Dongre (20)

Job opportunities for electronics engineering
Job opportunities for electronics engineeringJob opportunities for electronics engineering
Job opportunities for electronics engineering
Vikas Dongre
 
Educational video creation: Tools and tips
Educational video creation: Tools and tipsEducational video creation: Tools and tips
Educational video creation: Tools and tips
Vikas Dongre
 
Scope of job education and business after HSC
Scope of job  education and business after HSCScope of job  education and business after HSC
Scope of job education and business after HSC
Vikas Dongre
 
Introduction to digital logic gates
Introduction to digital logic gatesIntroduction to digital logic gates
Introduction to digital logic gates
Vikas Dongre
 
Introduction to binary number system
Introduction to binary number systemIntroduction to binary number system
Introduction to binary number system
Vikas Dongre
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded c
Vikas Dongre
 
Arithmetic and Logic instructions in Embedded C
Arithmetic and Logic instructions in Embedded CArithmetic and Logic instructions in Embedded C
Arithmetic and Logic instructions in Embedded C
Vikas Dongre
 
Introduction to Embedded system programming using 8051
Introduction to Embedded system programming using 8051Introduction to Embedded system programming using 8051
Introduction to Embedded system programming using 8051
Vikas Dongre
 
Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051
Vikas Dongre
 
Arithmetic and logic operations in c
Arithmetic and logic operations in cArithmetic and logic operations in c
Arithmetic and logic operations in c
Vikas Dongre
 
Arithmetic and logic operations in c
Arithmetic and logic operations in cArithmetic and logic operations in c
Arithmetic and logic operations in c
Vikas Dongre
 
Classification of embedded systems
Classification of embedded systemsClassification of embedded systems
Classification of embedded systems
Vikas Dongre
 
Characteristics of embedded systems
Characteristics of embedded systemsCharacteristics of embedded systems
Characteristics of embedded systems
Vikas Dongre
 
Features of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processorsFeatures of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processors
Vikas Dongre
 
Microcontroller architecture
Microcontroller architectureMicrocontroller architecture
Microcontroller architecture
Vikas Dongre
 
2. block diagram and components of embedded system
2. block diagram and components of embedded system2. block diagram and components of embedded system
2. block diagram and components of embedded system
Vikas Dongre
 
1. advantages and applications of embedded system
1. advantages and applications of embedded system1. advantages and applications of embedded system
1. advantages and applications of embedded system
Vikas Dongre
 
Serial communication
Serial communicationSerial communication
Serial communication
Vikas Dongre
 
Innovative improvements in electronic engineering laboratory education using eml
Innovative improvements in electronic engineering laboratory education using emlInnovative improvements in electronic engineering laboratory education using eml
Innovative improvements in electronic engineering laboratory education using eml
Vikas Dongre
 
Devnagari handwritten numeral recognition using geometric features and statis...
Devnagari handwritten numeral recognition using geometric features and statis...Devnagari handwritten numeral recognition using geometric features and statis...
Devnagari handwritten numeral recognition using geometric features and statis...
Vikas Dongre
 
Job opportunities for electronics engineering
Job opportunities for electronics engineeringJob opportunities for electronics engineering
Job opportunities for electronics engineering
Vikas Dongre
 
Educational video creation: Tools and tips
Educational video creation: Tools and tipsEducational video creation: Tools and tips
Educational video creation: Tools and tips
Vikas Dongre
 
Scope of job education and business after HSC
Scope of job  education and business after HSCScope of job  education and business after HSC
Scope of job education and business after HSC
Vikas Dongre
 
Introduction to digital logic gates
Introduction to digital logic gatesIntroduction to digital logic gates
Introduction to digital logic gates
Vikas Dongre
 
Introduction to binary number system
Introduction to binary number systemIntroduction to binary number system
Introduction to binary number system
Vikas Dongre
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded c
Vikas Dongre
 
Arithmetic and Logic instructions in Embedded C
Arithmetic and Logic instructions in Embedded CArithmetic and Logic instructions in Embedded C
Arithmetic and Logic instructions in Embedded C
Vikas Dongre
 
Introduction to Embedded system programming using 8051
Introduction to Embedded system programming using 8051Introduction to Embedded system programming using 8051
Introduction to Embedded system programming using 8051
Vikas Dongre
 
Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051
Vikas Dongre
 
Arithmetic and logic operations in c
Arithmetic and logic operations in cArithmetic and logic operations in c
Arithmetic and logic operations in c
Vikas Dongre
 
Arithmetic and logic operations in c
Arithmetic and logic operations in cArithmetic and logic operations in c
Arithmetic and logic operations in c
Vikas Dongre
 
Classification of embedded systems
Classification of embedded systemsClassification of embedded systems
Classification of embedded systems
Vikas Dongre
 
Characteristics of embedded systems
Characteristics of embedded systemsCharacteristics of embedded systems
Characteristics of embedded systems
Vikas Dongre
 
Features of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processorsFeatures of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processors
Vikas Dongre
 
Microcontroller architecture
Microcontroller architectureMicrocontroller architecture
Microcontroller architecture
Vikas Dongre
 
2. block diagram and components of embedded system
2. block diagram and components of embedded system2. block diagram and components of embedded system
2. block diagram and components of embedded system
Vikas Dongre
 
1. advantages and applications of embedded system
1. advantages and applications of embedded system1. advantages and applications of embedded system
1. advantages and applications of embedded system
Vikas Dongre
 
Serial communication
Serial communicationSerial communication
Serial communication
Vikas Dongre
 
Innovative improvements in electronic engineering laboratory education using eml
Innovative improvements in electronic engineering laboratory education using emlInnovative improvements in electronic engineering laboratory education using eml
Innovative improvements in electronic engineering laboratory education using eml
Vikas Dongre
 
Devnagari handwritten numeral recognition using geometric features and statis...
Devnagari handwritten numeral recognition using geometric features and statis...Devnagari handwritten numeral recognition using geometric features and statis...
Devnagari handwritten numeral recognition using geometric features and statis...
Vikas Dongre
 
Ad

Recently uploaded (20)

MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Artificial Intelligence introduction.pptx
Artificial Intelligence introduction.pptxArtificial Intelligence introduction.pptx
Artificial Intelligence introduction.pptx
DrMarwaElsherif
 
The Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLabThe Gaussian Process Modeling Module in UQLab
The Gaussian Process Modeling Module in UQLab
Journal of Soft Computing in Civil Engineering
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
How to use nRF24L01 module with Arduino
How to use nRF24L01 module with ArduinoHow to use nRF24L01 module with Arduino
How to use nRF24L01 module with Arduino
CircuitDigest
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
LECTURE-16 EARTHEN DAM - II.pptx it's uses
LECTURE-16 EARTHEN DAM - II.pptx it's usesLECTURE-16 EARTHEN DAM - II.pptx it's uses
LECTURE-16 EARTHEN DAM - II.pptx it's uses
CLokeshBehera123
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Artificial Intelligence introduction.pptx
Artificial Intelligence introduction.pptxArtificial Intelligence introduction.pptx
Artificial Intelligence introduction.pptx
DrMarwaElsherif
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
How to use nRF24L01 module with Arduino
How to use nRF24L01 module with ArduinoHow to use nRF24L01 module with Arduino
How to use nRF24L01 module with Arduino
CircuitDigest
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
LECTURE-16 EARTHEN DAM - II.pptx it's uses
LECTURE-16 EARTHEN DAM - II.pptx it's usesLECTURE-16 EARTHEN DAM - II.pptx it's uses
LECTURE-16 EARTHEN DAM - II.pptx it's uses
CLokeshBehera123
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 

Lcd interfaing using 8051 and assambly language programming

  • 1. Dr. Vikas Dongre HOD Electronics Government Polytechnic Washim Maharashtra, India [email protected] With KEIL program and Proteus Simulation
  • 2. LCD is finding widespread use replacing LEDs 􀂾 The declining prices of LCD, descent looking, less power consumption 􀂾 The ability to display numbers, characters, and graphics 􀂾 Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the task of refreshing the LCD 􀂾 Ease of programming for characters and graphics Seven Segment Display Liquid Crystal Display (LCD) Liquid Crystal Display
  • 4. LCD Block DiagramLCD Char 5x7 Matrix 16x2 LCD DISPLAY
  • 6. Pin Symbol I/O Description 1 Vss - Ground 2 Vdd - +5V Power Supply 3 Vee - Contrast control power supply 4 RS Register select RS=0 Command register RS=1 Data register 5 R/W I R- Write/ W-Read 6 E I Enable 7-14 DB0-DB7 I/O Data Bus 16x2 LCD Display
  • 7. Working of LCD Display controller 1.Command Register: Controls the working of LCD Controller 2.Data Register: Used to store the data to be displayed on LCD 3.Alphanumeric and graphic Character set memory for various languages
  • 8. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 1 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF 16x2 LCD DISPLAY ADDRESSES 2 ROWS 16 COLUMNS
  • 9. Co de Command to LCD Instruction Register 01 Clear display screen 02 Return home 04 Decrement cursor (shift cursor to left) 06 Increment cursor (shift cursor to right) 05 Shift display right 07 Shift display left 08 Display off, cursor off 0A Display off, cursor on 0C Display on, cursor off Co de Command to LCD Instruction Register 0E Display on, cursor blinking 10 Shift cursor position to left 14 Shift cursor position to right 18 Shift the entire display to the left 1C Shift the entire display to the right 80 Force cursor to beginning to 1st line C0 Force cursor to beginning to 2nd line 38 2 lines and 5x7 matrix
  • 10. Algorithm Start Initialize LCD by providing various commands to Control register Send data to be displayed on Data register byte by byte Stop
  • 11. COMNWRT: ;send command to LCD MOV P0, A ;copy reg A to port 0 CLR RS ;RS=0 for command Register CLR RW ;R/W=0 for write SETB E ;E=1 for high pulse CLR E ;E=0 for H-to-L pulse ACALL DELAY ;give LCD some time RET Subroutine for Writing in Command Register DATAWRT: ;send command to LCD MOV P0,A ;copy reg A to port 1 SETB RS ;RS=1 for Data Register CLR RW ;R/W=0 for write SETB E ;E=1 for high pulse CLR E ;E=0 for H-to-L pulse ACALL DELAY ;give LCD some time RET Subroutine for Writing in Data Register
  • 12. ORG 0000 MOV A,#38H ;INIT. LCD 2 LINES, 5X7 MATRIX ACALL COMNWRT ;call command subroutine MOV A,#0EH ;display on, cursor on ACALL COMNWRT ;call command subroutine MOV A,#01 ;clear LCD ACALL COMNWRT ;call command subroutine MOV A,#06H ;shift cursor right ACALL COMNWRT ;call command subroutine MOV A,#86H ;cursor at line 1, pos. 6 ACALL COMNWRT ;call command subroutine Program to display the word “WORLD” on 16x2 LCD Display Initialize Control register
  • 13. MOV A,#“W" ;display letter W ACALL DATAWRT ;call display subroutine MOV A,#“O" ;display letter O ACALL DATAWRT ;call display subroutine MOV A,#“R" ;display letter R ACALL DATAWRT ;call display subroutine MOV A,#“L" ;display L ACALL DATAWRT ;call display subroutine MOV A,#“D" ;display D ACALL DATAWRT ;call display subroutine Send data to be displayed on Data register
  • 14. COMNWRT: ;send command to LCD MOV P0,A ;copy reg A to port 1 CLR P1.0 ;RS=0 for command CLR P1.1 ;R/W=0 for write SETB P1.2 ;E=1 for high pulse CLR P1.2 ;E=0 for H-to-L pulse ACALL DELAY ;give LCD some time RET COMMAND WORD SUBROUTINE
  • 15. DATAWRT: ;write data to LCD MOV P0,A ;copy reg A to port 1 SETB P1.0 ;RS=1 for DATA CLR P1.1 ;R/W=0 for write SETB P1.2 ;E=1 for high pulse CLR P1.2 ;E=0 for H-to-L pulse ACALL DELAY ;give LCD some time RET DATA WORD SUBROUTINE
  • 16. DELAY: MOV R3,#255 ;OUTER COUNT HERE2: MOV R4,#255 ;INNER COUNT HERE: DJNZ R4,HERE ;stay until R4 becomes 0 DJNZ R3,HERE2 RET END DELAY SUBROUTINE
  • 17. Output with KEIL program and Proteus Simulation
  • 18. Thank you !!! Dr. Vikas Dongre HOD Electronics Government Polytechnic Washim [email protected]