Hardware Reference
In-Depth Information
Here's a breakdown of the pin connections:
The contrast adjustment pin changes how dark the display is. It connects
to the center pin of a potentiometer.
The register selection pin sets the LCD to command or character mode,
so it knows how to interpret the next set of data that is transmitted via
the data lines. Based on the state of this pin, data sent to the LCD is either
interpreted as a command (for example, move the cursor) or characters
(for example, the letter a ).
The RW pin is always tied to ground in this implementation, meaning
that you are only writing to the display and never reading from it.
The EN pin is used to tell the LCD when data is ready.
Data pins 4-7 are used for actually transmitting data, and data pins 0-3
are left unconnected.
You can illuminate the backlight by connecting the anode pin to 5V and
the cathode pin to ground if you are using an LCD with a built-in resistor
for the backlight. If you are not, you must put a current-limiting resistor
in-line with the anode or cathode pin. The datasheet for your device will
generally tell you if you need to do this.
You can connect the communication pins of the LCD to any I/O pins on the
Arduino. In this chapter, they are connected as shown in Table 10-2.
Table 10-2: Communication Pins Connections
LCD PIN
ARDUINO PIN NUMBER
RS
Pin 2
EN
Pin 3
D4
Pin 4
D5
Pin 5
D6
Pin 6
D7
Pin 7
Reference the wiring diagram shown in Figure 10-2 and hook up your LCD
accordingly.
Search WWH ::




Custom Search