A microcontroller can communicate with the user by several means including LED display, sound generation, using the serial communication etc. The most commonly found output device in a microcontroller board is an LCD display module. The LCD module makes the system stand-alone since the systems don’t have to rely on an external PC where it can display the data send by using serial communication ports. There are basically two kinds of LCD modules, character LCD modules and graphical LCD modules. The graphical LCD modules can display graphics easily, but it doesn’t have built ASCII characters to easily display text. The character LCD modules on the other hand have in-built storage of ASCII characters so that the microcontroller can easily send ASCII values to the module to display the corresponding character.
How to display custom animations on 16×2 LCD using 8051 microcontroller (AT89C51)- (Part 12/45)
Animating custom made characters on a 16×2 LCD screen can be very exciting. This topic explains the principle and operation of a displaying animation on LCD [[wysiwyg_imageupload::]]using Microcontroller AT89C51. There’s a useful side effect to the way the LCD controller uses CG RAM. Normally, we define a pattern in CG RAM, and then print the character. But it is also possible to change the CG RAM for characters that are already on the screen, and their appearance will change. Before animation, the custom characters of heart, cutting heart, blank screen and arrow should be stored at different addresses. (for more detail about CG RAM and LCD refer LCD custom character and LCD interfacing).The connections in the circuit are as follow: the output of controller (from port P2) goes to data pins of LCD numbered 7-14. The control pins RS (pin4), R/W (pin5) and EN (pin6) are connected to the pins 0, 1 and 6 of port P3 (P3^0, P3^1 & P3^6, respectively).
How to create text animation on 16×2 LCD using 8051 microcontroller (AT89C51)- (Part 9/45)
A static message can be displayed on a 16×2 LCD by interfacing it to the microcontroller (AT89C51). The same message can also be displayed with certain [[wysiwyg_imageupload::]]animated effects like moving, blinking etc. This topic explains how to create dynamic effects with the text displayed in LCD. 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. To create a particular effect, any of these code(s) can be used in a pattern. For example, shifting the entire display right (5H) in a loop will keep moving the text to right. To create oscillating text, first keep shifting the string to right (for say, 8 positions) and then shift it to left. This left-right shifting can be done in an infinite loop.Here P2 is used as output port of the 8051 microcontroller (AT89C51) which sends the data byte to data pins of the LCD. The control pins (pin 4, 5 & 6) are connected to pins 0, 1 & 6, respectively, of P3 port of the microcontroller. Pin 3 is connected to a preset of 10k to adjust the contrast on LCD screen.