Arduino Uno + Powertip PC2004A 20x4 LCD Display


Trying to send something on this display (Powertip PC2004A 20x4) but have no luck. All I have is squares in 1. and 3. line. Depending on the sketch I can manage to make it blink (those squares) but other things are not possible.

I assume that problem can come from:

1)Wrong initialization of this type of LCD which is based on ST7066U instead on mostly common Hitachi LCDs. On Internet a lot of people talking about problems with initialization of ST7066U because of different timing intervals (delays) and many other differences. Is there anybody that has working sketch for ST7066U? Does Liquid Crystal library has support for this type of displays.

2) Programming - For testing purposes I was using Liquid Crystal library (Arduino 1.05) (Display.ino) and wondering if I have completed wiring and "reconfiguration" of code as I should. Wiring is done as it is written in ino file. lcd variable is initialized as wired. Now, if I have LCD 20x4, should I use:

lcd.begin(16, 2); or lcd.begin(20, 4);

... asking because as far as I see all are using lcd.begin(16, 2) regardless of number of columns and rows !?? So If I need to address (print on) second line 4. place - it is actually first line place 24. Is it ?

3) Wiring display - if I have 4-bit scenario, do I have to connect to GND all LCD's pins not used ? For example, If I don't use pins DB0-DB3 should I connect them to GND? Same question about back-light - this model I have is without back-light, so, should I connect pins 15 and 16. to GND or leave it as it is?

Thanks. acosmo

All I have is squares in 1. and 3. line.

This is indeed a symptom of improper initialization. The problem is frequently due to a problem with your wiring so we need to see a photograph that allows us to unambiguously follow each wire from the Arduino to the LCD display.

The type of controller should not make a difference (as long as it is HD44780 compatible) if the library is written properly. The quality of that controller is another story as some of the devices that show up on eBay may be out of spec.

Unfortunately the Liquid Crystal library that comes with the IDE sometimes has a problem with those 'slow' controllers, especially in the 4-bit mode. You might want to try a different library. I know of one, called LiquidCrystal1.0, that was written for the 40x4 displays but which will work for the smaller displays as well. It has been optimized to work with marginal controllers. To get a copy start here:--> and follow the [u]Downloads[/u] link to get to the latest version.

Your lcd.begin() statement should match your display although it is only the cursor positioning that won't work properly for the lower two lines you use (16,2) instead of (20,4).

If you have a 16x4 display you will have to use the library mentioned above because the 'official' one does not deal with the lower two lines properly in any case.

You do not have to do anything with the unused pins when you use the 4-bit interface or if you have no backlight, you can leave them floating.


Hi Don,

Thank you on your detailed reply.

I shall try later today and get back with results.


Sorry, but I have to make Off topic here because I have new issue …

Last night I have tried to work with this LCD and I have used this “connection scenario”:

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground
  • LCD Vo pin to GND
  • LCD Vdd pin to +5V
  • LCD Vss pin to GND
    Note: LCD pins D0-D3 not connected and 15. and 16. pins not connected

During testing with various .ino files I had display working on Line1 and Line3 (of four lines). Contrast on display was weak but I have assumed that Vo = GND was the reason since this LCD has best contrast when Vo is on negative voltage (which I don’t have).

Tonight, I have completely different contrast on LCD and different among different cells on display - as on picture I have attached. Brightness is good on one line and on another on only four cells. On rest of the cells is weak as was last night.

What can be a problem ? Does this LCD has some hardware problem or I am making some mistake in software ( addressing specific position etc…). At the moment I am using LiquidCrystal_v1.0 Display.ino, but I have tried with original LiquidCrystal that comes with Arduino and it is the same.