Go Down

Topic: HD44780 - no squares when logic is powered up (Read 142 times) previous topic - next topic

gshaw

Jun 07, 2015, 05:34 pm Last Edit: Jun 07, 2015, 06:04 pm by gshaw
Hi all, I've been trying to follow a couple of guides to get this display up and running with an Arduino Uno:

http://www.rapidonline.com/electronic-components/midas-20x4-vatn-display-negative-mode-red-led-backlight-56-2572

It seems to be standards-compatible with all other HD44780 wiring so I initially followed this guide:

http://www.instructables.com/id/Connecting-an-LCD-to-the-Arduino/

However when powering up and uploading the "Hello World" sketch I get nothing on the screen (backlight is on though)

Today I found this guide (which I wish I'd seen before really, damn you Google!) that breaks down the steps and tests at each point:

https://learn.adafruit.com/character-lcds/wiring-a-character-lcd

As soon as I hook up pins 1 & 2 the display blanks out. If I remove those and just power the backlight and pot I do get some display:



There's also advice to just hook up pins 1,2 and 3 but given the fact the display text uses the backlight I don't think running without it will tell me much?

I've got a bad feeling it's a busted screen but does anyone else have any other suggestions? Any info much appreciated :)

floresta

#1
Jun 07, 2015, 07:07 pm Last Edit: Jun 07, 2015, 07:13 pm by floresta
Quote
... so I initially followed this guide:
The fact that the guide is an 'instructable' should have been a warning.


Quote
As soon as I hook up pins 1 & 2 the display blanks out.
As it should if you haven't got the contrast set up properly.


Quote
There's also advice to just hook up pins 1,2 and 3 but given the fact the display text uses the backlight I don't think running without it will tell me much?
That advice is correct if the display does not have a backlight or does not require that the backlight be on to see the display.

Where did you get the advice to provide a contrast voltage on pin 3 without also providing power to the controller via pins 1 and 2?

The Adafruit guide is one of the best but you have to follow it carefully.  Did you see (and follow) the comment directly above where the 'Bus Wiring' section begins.

Here are my generic step-by-step instructions which roughly parallel those of Adafruit:


(1) If the module has a backlight then get it working properly.  This involves only pins 15 and 16 on most LCD modules.  Make sure to use a current limiting resistor if there is none on the LCD module.

(2) Get the power and contrast working properly.  This involves only pins 1, 2, and 3 on most LCD modules.  You should be able to just barely see blocks on one row of a two row display and on two rows of a four row display.  

NOTE:  The Arduino has not been used yet, except as a possible source for the power needed for the first two steps.  Do not try to go any further until this is working. If you don't see the blocks then no amount of program code will help.

(3) Connect the LCD R/W pin (pin 5) to GND.

(4) Connect the six control and data wires between your LCD module and your Arduino.

(5) Upload your sketch and it should work.


Troubleshooting:

If you have a 16x1 display and there are blocks only on the left half of the row in step 2 then use lcd.begin(8, 2); in your sketch.

If you still don't get a display then make sure that your wiring matches the numbers in the descriptor (or vice versa).

Code: [Select]
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here


If you get a display but it is garbled or has some other problems then try again with a 'static' sketch, one that displays a simple message on the top row of the display and then stops.  All of your code should be in setup() and loop() should be empty between the brackets.

Code: [Select]

#include <LiquidCrystal.h>

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

void setup()
  {
  lcd.begin(16, 2);                          // put your LCD parameters here
  lcd.print("hello, world!");
  lcd.setCursor(0,1);
  lcd.print("it works!");
  }

void loop()
  {
  }


If you are still having problems then we need to see a photograph of your setup that clearly and unambiguously shows all of the connections between your Arduino and your LCD module.  We also need a copy/paste version of the code that you are actually using, not a link to the code that you think you are using.

Don

gshaw

Hi Don,

I tried rewiring again from scratch but still no joy so I ordered a cheap 20x4 standard green backlit LCD from eBay as I figured that would be easier to troubleshoot in terms of seeing what's on the screen.

Hooked it up in the same way and it worked first time :)

Bad news is that when I switched it for the original screen there's still nothing showing on it.

The only other thing I can think is that the VATN display might need a larger pot, as on the standard screen the contrast only kicks in almost at the end of the 10k's travel. Maybe the negative mode ones need 20k (says anywhere between 10k and 20k in the datasheet iirc)

If not that then the only other thing I can think is that I was unlucky and got a DOA unit, can't see any other way I can test it?

Regards,

Gerrard

floresta

#3
Jul 09, 2015, 12:32 am Last Edit: Jul 09, 2015, 03:53 pm by floresta
The size of the potentiometer will not affect where the contrast 'kicks in'.

I just took a look at the datasheet for your device and I see that you need a negative voltage on your contrast pin.

Take a look at section 8 (Electrical Characteristics) where it shows that the typical contrast voltage requirement is 6.5 volts.  This means 6.5 volts less than the logic supply voltage of +5 or -1.5 volts.

Normally you would need a second power supply to provide this negative voltage but if you look at the diagram below the chart you will see that the bottom of the pot goes to Vee, not Vss.  You will find Vee on pin 15.

Don

Paul__B

You will find Vee on pin 15.
And I sure hope you did not connect pin 15 to +5V.

gshaw

#5
Jul 18, 2015, 06:47 pm Last Edit: Jul 18, 2015, 09:28 pm by gshaw
Don you're a genius! Switched the pot input to pin 15 as you suggested and the display has sprung into life :D


Go Up