LCD 1602 pinout and Interface
The LCD pins are numbered from 1- 16 , look behind the LCD to see the numbering.
The table below explains how to connect the LCD pins to the Arduino.
In the case where the LCD is powered with the Arduino by the 5V USB cable, selecting the contrast resistor to be 2K ohm and the back LED resistor to be 100 ohm is a good start. Alternatively, a 5K potentiometer can be used to adjust the contrast for vest viewing.
Wiring with Arduino
Follow the above table and circuit diagram in Fig 1, and wire up the LCD using the wires provided.
|RED||VCC of +5V|
|Other colors||Data and signal lines|
Fig 1. LCD to Arduino interfacing circuit
In this example we use the Arduino pins 0,1,2,3,4 & 5 for connectivity to the LCD pins 4,6, 11,12,13 & 14, respectively (see table 1). Therefore in Arduino code, we initialise the lcd() as follows:
LiquidCrystal lcd(0, 1, 2, 3, 4, 5);
This code segment tells the Arduino how the LCD is connected to it.
Download this LCD code and open it in the installed Arduino Development Environment
( Which comes in the accompaniying CD )