Hi, Guys.
Today my friend's got a problem when he tried to connect LCD 1602A to a Arduino Mega260 board. He asked me "Why LCD did not show anything?". So I tried to find some topics to help him. Some guys solved this problem, and update into forum but sometimes we did, but we don't understand why we did, how does it work...
Defested:
Problem has been solved! I do not know what the problem was, after unwiring everything and rewiring with new Arduino, breadboard, and wire it works now.
I did it too. And I hope this topic help you solve your problems with LCD 1602A (Figure 1 - Try to connect!)
First of all, I used both Uno and Mega 2650; LCD 1602A, and two potentiometers 10KOhm; wires and breadboard.
Instead of using resistors (I don't know exactly how much resistor we need), try to connect LCD 1602A to Arduino board uses two potentiometers 10kOhm as figure bellow. I'm sure you know how to connect them.
The circuit:
- LCD RS pin to digital pin 12
- LCD Enable pin to digital pin 11
- LCD D4 pin to digital pin 5
- LCD D5 pin to digital pin 4
- LCD D6 pin to digital pin 3
- LCD D7 pin to digital pin 2
- LCD R/W pin to ground
- ends to potentiometer signal pin and ground
- wiper to LCD VO pin (pin 3)
Figure 2 _ Connection diagram!
If we use two potentiometers, we can adjust bright on LCD and what we want to show.
Anode - Pin 15 (A) adjusts bright on LCD
V0 - Pin 3 adjusts contrast of light as far as I understand;
Now you can try to upload sample programs from File> Examples> LiquidCrystal> ....
And here is my result, You can do it.
Figure 3 - Result
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Well done.");
lcd.setCursor(0, 1);
lcd.print("We did it!");
}
void loop() {
}
Well done!