2

I just acquired a Arduino learning kit, which includes a 20x4 LCD display. I was going to test it, so I grabbed an example "hello world" program from the Arduino docs, connected the display appropriately, and then "Voila! ... Oh, it didn't work.".

The display lights up both its backlight and characters, however not in any desirable pattern. The first and third lines are full white (display is white-on-blue), while lines 2 and 4 are full blue. See picture:

lines: white blue white blue

The below schematic is exactly how I've connected the display, which should be correct.

schematic

simulate this circuit – Schematic created using CircuitLab

I triple-checked all wiring for any shorts, adjusted the potentiometer to a good value and quadruple-checked the connections, and wasn't able to find any errors.

The dead-simple example program is following:

#include <LiquidCrystal.h>

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


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

void loop() {
}
  • Where is the decoupling for the LCD? – Ignacio Vazquez-Abrams Oct 25 '14 at 17:52
  • @IgnacioVazquez-Abrams Sorry? I was following this tutorial (in Portuguese) for the connections, it doesn't mention that... blog.filipeflop.com/display/controlando-um-lcd-16x2.html – Kroltan Oct 25 '14 at 17:56
  • After a quick search, I see that you mean a decoupling capacitor, right? Apparently, the kit I've bought doesn't have a capacitor that I could use for that purpose. – Kroltan Oct 25 '14 at 18:00
  • 1
    Just putting the jumper wires in the plated holes, doesn't always give a good connection. Try applying some lateral force, to make sure all of them have proper contact. Wiring looks otherwise fine. – Gerben Oct 25 '14 at 20:48
  • @Gerben Indeed, after pushing the screen in the direction of the Arduino (as per Q image) and rebooting it, it worked correctly. Would you mind turning this into an answer, and if possible, suggest a better way to connect the display? – Kroltan Oct 25 '14 at 21:08
1

Just putting the jumper wires in the plated holes, doesn't always give a good connection. Try applying some lateral force, to make sure all of them have proper contact. Wiring looks otherwise fine.

A more permanent solution would be to solder some male headers to the display, so you can properly seat it into the breadboard.

  • Had the same issue recently, only after soldering my cables to the LCD I was able to avoid tilting them to make effective contact. It's definitely a problem of bad contact. In my LCD the holes turned out to be too big. – Germán Carrillo Mar 24 '15 at 3:35
0

I had similar problem and I found that I had wrong contrast/brightness. Communication was working but just the characters were invisible. I spent much time, changed the LCD and in the last minute before went to rubish I got it.

  • I did check the potentiometer values, and it is on a ok contrast. It's really the characters – Kroltan Oct 25 '14 at 18:52
  • 1
    It's definitely not the contrast. It hasn't even initialized properly. – Ignacio Vazquez-Abrams Oct 25 '14 at 19:43
  • First, and third lines is all white, second and fourth lines are all blank. So contrast has been set correctly. – Gerben Oct 25 '14 at 20:27
  • Even though contrast may not be the case in this particular scenario, I can confirm that, for some screens, a poor contrast setting gives these exact symptoms. – apnorton Oct 26 '14 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.