4.2 8051 - 16x2 Generic LCD Display
4.2 8051 - 16x2 Generic LCD Display
Univ. Q. Interface LCD to 8051 and write assembly language program to display message
“HELLO” on it. (MU - Dec. 17, 10 Marks)
Univ. Q. Explain LCD interfacing with 8051 and write assembly language program to display
message “HI” on it. Draw the connection diagram of 8051 with LCD.
(MU - May 19, 10 Marks)
Univ. Q. Interface LCD to 8051 and write a program to display the message “LCD” on it.
Draw the connection diagram of 8051 with LCD. (MU - Dec. 19, 10 Marks)
LCD displays are far more useful than 7 segment LEDs because they can be used to display text adequately.
Complex charecters like W, M, K, Q etc. can be easily displayed using a matrix of pixels .
In most cases 5x7 matrix is used to display one character, 5 columns and 7 rows.
An LCD Unit comes with an LCD display and its own controller. The entire unit is interfaced with 8051 as
shown :
Put out the command on the port (P1) Put out the data on the port (P1)
Make Register Select = 0 (Command) Make Register Select = 1 (Data)
Make R/W = 0 (As we are writing) Make R/W = 0 (As we are writing)
Make Latch Enable = 1 Make Latch Enable = 1
Make Latch Enable = 0 (Falling Edge) Make Latch Enable = 0 (Falling Edge)
Call a delay of 10 milliseconds Call a delay of 10 milliseconds
Interface a 16x2 line LCD Unit to 8051 and hence write a program to display “Happy Diwali”
Interface
Fig. 4.2.1
Algorithm
Increment Index R6
Decrement Loop count R7 and Loop till all characters re displayed
Introduction to DC Motor
DC motors are widely used at places where constant speed is required. They are very easy to
interface and program.
Besides, they can easily switch between clockwise and anticlockwise motion. Their typical usage is
in fans, blowers, conveyor belts, pumps, lifts etc.
A DC motor simply requires two pins to control its movements.
By sending a 01 or a 10 on these pins we can move the motor clockwise or anticlockwise. Sending
a 11 or a 00 on the two pins will stop the motor.