Anda di halaman 1dari 4

[Arduino] LCD Display HJ1602A

Posted on March 5, 2012


One of the most important things when dealing with micro-controllers is the ability to output
data. With the Arduino, this can be accomplished easily with the Serial class /
console, transferring the data back to the computer through the USB cable. However, what if
you are developing a product that is supposed to be portable? Well, you will need a LCD
Display panel.
Heres how I set mine up:
(Note the right side is to Arduino)
pin 1 [VSS] Ground
pin 2 [VDD] 5V Power Supply
pin 3 [V0 ] Resistor then to Ground (Contrast Control)
pin 4 [RS ] D12
pin 5 [RW ] D11
pin 6 [E ] D10
pin 7 [D0 ] N/A
pin 8 [D1 ] N/A
Billwaa's Blog
There's just so Much to Life that the Sky is not the Limit!
pin 9 [D2 ] N/A
pin 10 [D3 ] N/A
pin 11 [D4 ] D5
pin 12 [D5 ] D4
pin 13 [D6 ] D3
pin 14 [D7 ] D2
pin 15 [A ] Resistor then to 5V Power Source (Backlight Source)
pin 16 [K ] Ground
SHARE THIS:
Twitter Facebook
This entry was posted in Arduino, Engineering and tagged Arduino, Display, HJ1602A,
LCD, Source by Billwaa. Bookmark the permalink
[http://billwaa.wordpress.com/2012/03/05/arduino-lcd-display-hj1602a/] .
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <LiquidCrystal.h>

//Initialize LCD
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

void setup()
{
//Set LCD Display Size
lcd.begin(16,2);
lcd.clear();
}


void loop()
{
//Set Cursor and Display
lcd.setCursor(0,0);
lcd.print("Hello World");
}
About these ads
- /
Like
Be the first to like this.
V
RELATED
[Arduino] DFRobot LCD
Keypad Shield DFR0009
[Arduino] L298 Dual H-
Bridge Motor Driver
[Arduino Project] Analog
Digital Reader
3 THOUGHTS ON [ARDUINO] LCD DISPLAY HJ1602A
Bulat
on March 27, 2012 at 1:50 AM said:
Thank you for useful explanation of HJ1602A working! But it is still not clear, which
backlight and contrast resistors must be used in this circuit?
Billwaa
on March 27, 2012 at 9:14 AM said:
Hey there. The backlight source (pin 15) is optional, if you input a 5V on that
pin, the backlight LED will be on, or else it will be off. It will still display text
regardless though. It just provide better view-ability with the backlight on. If
could attach that to an Arduino digital pin if you want, so you can directly
control the backlight like how you would with a normal LED. As with normal
LED, you always want to attach a resistor in series in order to limit the current
and have a longer LED service life. For the resistor itself, since I am not an
Electrical Engineering major, I dont really know which value to use. But
anyone that is not too strong should work (aka it still allow the LED to turn
on).
As for the contrast control, similar deal. With different value for the resistor,
the text appear to be either stronger or not as strong. You just have to play
around to see which resistor work best for you. It is sometime different from
board to board. Some people just use a potentiometer, which you can adjust
the resistance. Hope that helps!
Bulat
on March 27, 2012 at 11:07 AM said:
Really appreciated with so quick response.
Following your advice, after quick experimentation, I realized 2k
resistors are suitable both for backlight supply and contrast control.
This may be orientation figures. Anyway, as you mentioned, each
display, even with standard controller, needs different resistors. So
experiment is a key for success in this case.
Follow
Follow Billwaa's Blog
Get every new post delivered
to your Inbox.
Enter your email address
Sign me up
Powered by WordPress.com

Anda mungkin juga menyukai