How to create text animation on 16x2 LCD using 8051 microcontroller (AT89C51)
Summary
A static message can be displayed on a 16x2 LCD by interfacing it to the microcontroller (AT89C51). The same message can also be displayed with certain animated effects like moving, blinking etc. This topic explains how to create dynamic effects with the text displayed in LCD.
Description
A string or message can be displayed on LCD by sending its characters to data register after configuring the command register of LCD. To create dynamic effects, a specific command instruction is sent to LCD via microcontroller AT89C51. The different command codes for LCD are tabulated below:
Hex Code | Command to LCD Instruction Register |
1 | Clear screen display |
2 | Return home |
4 | Decrement cursor |
6 | Increment cursor |
5 | Shift display right |
7 | Shift display left |
8 | Display OFF, cursor OFF |
A | Display OFF, cursor ON |
C | Display ON, cursor OFF |
E | 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 the cursor to the beginning of the 1st line |
C0 | Force cursor to the beginning of the 2nd line |
38 | Use 2 lines and 5x7 matrix |
Video
Code
This Code is only visible to Registered users. Please Login/Register
Components
|
Preset A preset is a three legged electronic component which can be made to offer varying resistance in a circuit. The resistance is varied by adjusting the rotary control over it. The adjustment can be done by using a small screw driver or... |
|
AT89C51 Microcontroller AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory (... |
|
LCD
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments... |
- 20604 reads
