Hardware Reference
In-Depth Information
Electronics became smaller and smaller, while still becoming more and more
powerful. New production techniques allowed LCD screens to become more
and more advanced, and a new generation was born.
Modern LCD screens can display numbers and letters: both uppercase and
lowercase. Much like the fonts on a computer screen, text and numbers can be
written using a matrix of dots. By creating a simple matrix of 5 x 7 points, every
single letter in the Latin alphabet can be displayed, and this even works on other
alphabets. The downside to this is the complexity of the electronics involved
to create connections for a matrix of 5 by 7 squares for every letter required,
but most displays come with an integrated controller making the task much
easier. Just tell the display what you want to print, and the controller does all
the hard work for you.
This type of LCD screen does not talk about resolution . A typical desktop or
laptop screen talks about a resolution in pixels, but these screens talk about the
number of letters; 16 x 2 means 16 letters on two lines. It does not talk about
resolution because this isn't how these screens work; they are composed of sev-
eral small 5 x 7 screens, but with space between each segment. It isn't possible
to display graphics on this type of screen.
LiquidCrystal Library
The Arduino LiquidCrystal library has been designed specii cally for one con-
troller: the Hitachi HD44780. Numerous boards exist with this controller, and
it is so popular that other controllers also have HD44780 compatibility.
Before using the library, it must i rst be imported. To import the library, go into
the Arduino IDE, and select the menu Sketch
LiquidCrystal.
Alternatively, you can manually add the header i le into your sketch:
Import Library
#include <LiquidCrystal.h>
To use the LiquidCrystal library, you must i rst create a named LiquidCrystal
object. Numerous parameters are required, and values depend on the device
that you will be using.
LiquidCrystal lcd(rs, enable, d4, d5, d6, d7);
LiquidCrystal lcd(rs, rw, enable, d4, d5, d6, d7);
LiquidCrystal lcd(rs, enable, d0, d1, d2, d3, d4, d5, d6, d7);
LiquidCrystal lcd(rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
The rs parameter is short for Register Select and indicates the pin that is con-
nected to the LCD's RS input. The enable parameter allows selection of the LCD
device and indicates the pin that is connected to the LCD's ENABLE connector.
 
Search WWH ::




Custom Search