Go Down

Topic: HD44780 LCD hookup help. (Read 1 time) previous topic - next topic

StealthRT

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: [Select]

#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 :(

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

David

mem

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

StealthRT

Alright i moved 0 and 1 to 6 and 7 but still nothing..
Code: [Select]

LiquidCrystal lcd(4, 11, 5, 6, 7, 2, 3);


David


StealthRT

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

Thanks for your help, mem.

David

REPthe603

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.
Whats a warranty?

mem

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

StealthRT

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

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy