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! :-/
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).
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?
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.
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.
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.
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!
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.
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.
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.
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.
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.