Pages: [1]   Go Down
Author Topic: HD44780 LCD hookup help.  (Read 831 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 131
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey all i am in need of some help hooking up my HD44780 20*4 LCD.

I currently have it wired as so on the HD44780:

Pin
1    Vss  GND
2    Vcc  5V
3    Vee GND
4    RS   PD4 on AVR
5    RW  GND
6    E     PD5 on AVR
7   DB0  not connected
8   DB1  not connected
9   DB2  not connected
10 DB3  not connected
11 DB4  PD0 on AVR
12 DB5  PD1 on AVR
13 DB6  PD2 on AVR
14 DB7  PD3 on AVR
15 A     +5V with 330[ch937]
16 K           GND

And this is my arduino code:
Code:
#include <LiquidCrystal.h>

// LiquidCrystal display with:
// rs on pin 4
// rw on pin 11
// enable on pin 5
// d4, d5, d6, d7 on pins 0, 1, 2, 3, 4
LiquidCrystal lcd(4, 11, 5, 0, 1, 2, 3);

void setup()
{
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop()
{
}
However, nothing shows up on the LCD smiley-sad

What could i be doing incorrect? I never connected the rw to the arduino, just to ground.

David
Logged

London
Offline Offline
Faraday Member
**
Karma: 9
Posts: 6247
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

pins 0 and 1 are used by the serial port, try using different pins
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 131
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Alright i moved 0 and 1 to 6 and 7 but still nothing..
Code:
LiquidCrystal lcd(4, 11, 5, 6, 7, 2, 3);

David
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 131
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset





David
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 131
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, i got it working. I must of had a wire crossed..

Thanks for your help, mem.

David
Logged

New Paltz, NY
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As  a side note, I believe the data pins are supposed to be a set of 4 sequential pins (because of "Lazy coding").  Personally, I use the LCD4Bit library since it doesn't require the RW pin and had a couple of new fun and usable functions like scrolling.  Glad you got it working though.
Logged

Whats a warranty?

London
Offline Offline
Faraday Member
**
Karma: 9
Posts: 6247
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I believe the data pins are supposed to be a set of 4 sequential pins (because of "Lazy coding").
The 'lazy coding' is actually in the lcd4bit library. LiquidCrystal has no such requirement
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 131
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was going to use that but all it displayed was Japanese-type on the lcd so i just used the example one that came with arduino software. Not sure what happened, i changed all the values in the c++ file to what worked for the arduino example code...

David
Logged

Pages: [1]   Go Up
Jump to: