HD44780 3.3v Help!

Hi,

I'm fairly new to arduino/electronics in general (although not new to programming) - trying to get the arduino working with a HD44780 compatible, 3.3v LCD from sparkfun (link below because I can't post links in my first post...).

I have hooked up the LCD exactly as discussed for the LiquidCrystal library, have a 10k pot working for controlling the contrast, backlight is working but for the life of me I can't get any output on the screen, have tried multiple sketches. All I get is a solid line at the top of the display, like a underscore upside down for each of the top line of characters.

I realised this morning that I am trying to drive a 3.3v device with 5v logic, could this be the reason I'm not getting output? Would a 5v to 3.3v regulator (LM3940) on each of the data lines sort this?

Also, what are the chances I've fried the board using 5v already?

I'm really sorry not to be posting my code here (I'm at work) will update later, it's killing me not understanding! :-/

Thanks so much

Tom

Link to sparkfun LCD is http://www.sparkfun.com/commerce/product_info.php?products_id=9054

Thanks for any and all help!

what are the chances I've fried the board using 5v already

The chances are good, or should that be bad. You have put an input voltage greater than the supply voltage and the data sheet for the controller says that is outside the absolute limits.

Would a 5v to 3.3v regulator (LM3940) on each of the data lines sort this

No a regulator is for power you need to cut down the voltage. One way is to have a series resistor of say 1K and a diode on the low voltage end up to the positive supply (3V3). Going from a low voltage output to a regular input should be no problem providing there are no pull up resistors on the input (internal or external).

dewgenenny:

The way I read the datasheets this device is rated for an absolute maximum of 7 v although it will run at 3.3v.

Don

Mike:
I agree that a voltage regulator can’t be used in this application.

But:

a regulator is for power you need to cut down the voltage

I thought a voltage regulator regulated voltage.

Don

Thanks everyone,

I tried using some zener? diodes between the data channels and ground to limit the voltage to 3.3v, with a 1k resistor in line.

Once I had this setup, on running the standard hello world example using LiquidCrystal library, the LCD displays a blinking cursor, but whatever I do (including trying the LCD4bit library) I can’t get the thing to work.

I’m not sure if the LCD is fried, especially given it does state 7v in the datasheet, but I’m fairly certain my brain is…

I have noted a post on the sparkfun website that discusses these devices possibly taking a little longer to initialize, with the solution being to enter a delay at the start to give it time to ‘warm up’ however I take it I would need to recomplie the LiquidCrystal library for that?

Cheers massively for all your help,

Tom

v17 of the ide compiles library on the fly, you can just edit it and when you compile the sketch it goes along for the ride

Tom:

Here's my standard recipe, which usually works:

  1. Hook up only the power and contrast pins (and backlight, if equipped). You should be able adjust the potentiometer to get a row of rectangular blocks on the top line of your display. If you don't get the row of blocks than there is no sense in proceeding.

  2. Use the LiquidCrystal library that comes with Arduino v0017 and cut and paste the example sketch that comes with it to use as your sketch. Do not use the example code in the playground, it is currently FUBAR. The 4-bit library and the older versions of LiquidCrystal are not reliable either.

  3. Don't forget to ground the RW pin (pin 5) if you have not specified a pin for it. This is not emphasized enough anywhere.

Don

Thanks Don,

That's basically the procedure I went through - got the contrast/backlight working nicely with the blocks showing if you turn up the contrast too high.

I do have R/W grounded and I have been using example that is in the IDE.

Will let you know how I go trying to insert a delay in the LiquidCrystal library to see if that helps, to be honest, not really to sure where I'll insert the delay though.... ho hum!

Cheers for your help!

Tom

Floresta said:-

The way I read the datasheets this device is rated for an absolute maximum of 7 v although it will run at 3.3v.

The way you read the data sheet is wrong. Look at the values for the input pins and you will see that it says anything above 0.3V ABOVE the supply (Vcc) will exceed the maximum ratings.

I thought a voltage regulator regulated voltage.

It does but when it has no volts on the input it will not present a logic zero at it's output.

Mike:

Perhaps the way you interpreted his original post was wrong. He didn't mention anything about the supply voltage that he was using.

Don

He didn't mention anything about the supply voltage that he was using

Yes he did:-

trying to get the arduino working with a HD44780 compatible, 3.3v LCD from sparkfun

and then said:-

I realised this morning that I am trying to drive a 3.3v device with 5v logic

I take that as meaning he was powering up the thing with 3V3. If he was powering it up with 5V then he was operating the LCD outside the recommended voltage but inside the absolute maximum. If that is the case then firing a 5V logic signal might not have damaged it, but I don't believe it to be the case.

I take that as meaning he was powering up the thing with 3V3.

He may actually have been supplying the LCD with 3.3 v but nowhere did he specifically mention this.

Don

He may actually have been supplying the LCD with 3.3 v but nowhere did he specifically mention this.

Well there is the title as a clue.

But no, he also didn't mention he wasn't trying to operate the whole system underwater. Or that his whole computer is not covered in custard. In fact there is so much people don't mention it is a wonder anyone can help anyone at all.

Thanks all for your help.

Have tried the logical approach that floresta suggested with no joy, seems I’ve learnt a valuable lesson in the process :). I did manage yesterday to get it to display a bunch of left arrows, I’m guessing I still don’t have the digital signal right…

Apologies if I didn’t post enough info - trust me I’m new to all this, so I honestly just don’t know where to start half the time. Your help and guidance is much appreciated.

I’m going to order a 5v LCD off ebay and see how I go, think for the sake of $8 I might as well save myself a bunch of hassle.

Cheers

Sorry if this has already been mentioned but why not dump the library altogether and talk to the digital pins direct?

Wire LCD Bits B4...B7 -> Duino Digital B4...B7 Tie WR to Ground ; Write only RS to Digital Pin B1 EN to Digital Pin B0

Set EN = 0 Set RS = 0 for Command Set EN = 1 Delay 1us to be sure Set EN = 0

0x28 SET 4BIT MODE 0x0F CURSOR BLOCK & FLASHING 0x01 CLEAR & HOME

Excuse my ignorance of Aruduino hardware, It's new to me but this is how my Pic comunicates wit LCD and it works fine.

P18F4550:

Just because an abbreviated version of the correct initialization steps works with your particular combination of hardware does not mean it will work with another combination.

The initialization steps specified in the datasheet, there are eight of them along with some very specific time delays, are designed to get any device functioning no matter what combination of hardware is used.

Don

Apologies if I didn't post enough info

OK BUT Now you know what we are asking what is the answer!!!

When you fed it with 5V logic were you also feeding it with 5V power?

If you were and made a double mistake that could have saved you. As you got it to display something maybe all is not dead.

However it is vital that you answer all our questions to get the best answers.

I've put together some schematics with voltage dividers to drop the 5v digital pins to operating levels.

When I've tested each I'll let you know how they work. Before I test, does anyone see any flaws in this plan?

By plan I'm referring to revision 2. The x (no connects) refer to connections that go to the arduino.

http://illustriousproductions.com/vd_rev1.png

http://illustriousproductions.com/vd_rev2.png