LCD crystal displays allow a better user interface compared with LED displays as it is much easier to display text messages in LCD displays. They also consume much less power than LED displays. Nonetheless, LED displays have better intensity than LCD displays
LCD displays are available usually in 8 x 2, 16 x 2, 20 x 2 or 20 x 4 formats. 8 x 2 means 2 lines of 8 characters each. These displays come with an LCD controller that drives the display.
The figure below shows the interface of an LCD display with a microcontroller, please note, this article is just showing the basic principles, the full details can be found on the official documentation for that specific microcontroller you working with.
There are three control lines, namely EN (enable), RS (register select) and RW (read/write). The EN line is used to instruct the LCD that the microcontroller is sending the data. When the RS line is HIGH, the data comprise text data to be displayed on the LCD. When the RS is LOW, the data is treated as a command or instruction to the LCD module. When the RW line is LOW, the instruction on the data bus is written on the LCD. When the RW line is HIGH the data is being read from the LCD.
The software routine initializes the LCD at the start by setting the width of the data bus, selecting the character, font, and so on, clearing the LCD, turning the LCD module and the cursor, setting the cursor position, and so forth. Then the data to be displayed is sent on the data lines and the three control signals are made use of to ensure proper LCD operation.
Related articles:
The world of electronics is constantly evolving, allowing designers and manufacturers to push the boundaries…
PIC microcontrollers are fabricated by Microchip Technology. PIC16C84 and PIC16F84 are the two microcontrollers in…
The ADD instruction tells the microcontroller’s CPU to add the source byte to register A…
8-bit microprocessors are limited in their speed (the number of instructions that can be executed…
The 68HC11 (also abbreviated as 6811 or HC11) is an 8-bit microcontroller that was introduced…
Mutual exclusion typically imposes some conditions on access to a given resource by two or…