Liquid Crystal Display:-
An LCD is a low-cost, low power device capable of displaying text and images. LCD's are extremely common in embedded systems since such system often does not have video monitors like those that come standard with desktop systems.
LCD's can be found on numerous common device like watches, copy machine, and calculators.
The basic principle of one type of LCD, a reflective LCD, works as follows, first, incoming light passes through a polarizing plate. Next, that polarized light encounters liquid crystal material.
If we excite a region of this material, we cause the material molecules to align, which in turns causes the polarized light to pass through the material. Otherwise, the light does not pass through.
Finally, light that passed through hits a mirror and reflects back, so the excited region appears to light up.
Another type of LCD, an absorption LCD works similarly but uses a block surface instead of a mirror. The surface below the excited regions absorbs light, thus appearing darker than the other regions.
A dot-matrix LCD consists of a matrix of dots that can display alphanumeric characters (letters and digits) as well as other symbols. A common dot-matrix LCD has five column and eight rows of dots for one character. An LCD driver converts input data into the appropriate electrical signals necessary to excite the appropriate LCD dots.
- Each type of LCD may be able to display multiple characters. Each character may be displayed in normal or inverted fashion.
- The LCD may permit a character to be blinking or may permit display of a cursor indicating the current character (blinking underscore). Such functionality would be difficult for us to implement using the software.
- Thus we use an LCD controller to provide us with a simple interface to an LCD having 8-data inputs (DB0-DB7) and one enable input.
- To send a byte to the LCD, we provide a value to the eight inputs and pulse the enable. This byte may be a control word, which instructs the LCD controller to initialize the LCD, clear the display, select the positions of the cursor, brighten the display.
- Alternately, this byte may be a data word, such as an ASCII characters, instructing the LCD to display the character at the currently selected display position.
- In this example, the microprocessor is connected to an LCD controller, which in turn is connected to an LCD as shown in fig. The LCD controller receives control words from and performs the corresponding action on the LCD.
- Once the initialization sequence is done, we can send control words as send actual data to be displayed.
- When RS is set to low to indicate that the data sent is control word.
- When RS is high this indicates that the data sent over the communication bus corresponds to a character that is to be displayed.
- Everytime data is sent whether it is a control word or data, the enable bit must be toggled.
- By using initialization code the : CD has been set with an 8-bit interface. In addition, the display has been cleared the cursor is in the home position and the cursor moves to the right as data is displayed. The LCD is now ready to be written to.
- In order to write data, we set RS=1. The actual data we want to write is on DB0-DB7. The write char functions accept a character which will be sent to the LCD controller to display on the LCD.
- The Enabled LCD function toggles the enables bit and acts as a delay so that the command can be processed and executed.