I have an unbranded QC1602A V2.0 display connected to a Raspberry Pi over 4-pin interface mode. Backlight and contrast are set in hardware, neither are controlled over the Raspberry Pi.

If I setup the display as it should be (16x2 characters of 5x8 pixels each), the text is displayed in a very hard-to-read dark color: Dark font

But if I set the display to 16x1 characters, 5x8 pixels each, the font suddenly switches to a very clearly readable white font: Bright font

The code I used for testing was this:

from RPLCD.gpio import CharLCD
lcd = CharLCD(rows=2,cols=16, pin_rs=15, pin_rw=18, pin_e=16, pins_data=[21,22,23,24], numbering_mode=GPIO.BOARD)
lcd.write_string("###FIRST PAGE###") # Black font
lcd.command(0b00100000) # Set to 16x1 characters
lcd.write_string("###SECOND PAGE##") # White font

And the same behaviour holds true if I do this:

from RPLCD.gpio import CharLCD
lcd = CharLCD(rows=1,cols=16, pin_rs=15, pin_rw=18, pin_e=16, pins_data=[21,22,23,24], numbering_mode=GPIO.BOARD)
lcd.write_string("###FIRST PAGE###") # White font

Does anyone know what the reason could be for this strange behaviour? I would be especially interested to find out how I could use the white font in 16x2 characters mode.


1 Answer 1


When I see how this LCD displays the character I immediately think contrast setting. Most 1602 displays have a contrast setting pin, usually it is the 3rd pin. If you connect that pin to a potmeter like so:

enter image description here

You can adjust the contrast. I guess you might have connected the pin to a GPIO output and that would result in the switch between white and weird (black) font that you see.

As a test, just disconnect the contrast pin and see what happens.

  • \$\begingroup\$ I had the contrast pin connected to Vss. I now connected it to the Raspberry to be controlled directly via RPLCD. I can change the contrast and it does change something, but it stays at the black font. The color changes from invisible to about the same shade of black as on the first photo. I don't get the white font. If I disconnect the contrast pin completely the text disappears. I don't have a potentiometer handy, so I tried to use voltage dividers made up from different resistors from 0 Ohm to 1k Ohm, but the color was always between black and invisible. \$\endgroup\$
    – Dakkaron
    Commented Jul 3, 2018 at 14:27
  • \$\begingroup\$ When testing, I found that if I set single line mode (and thus the color goes to white) and then experiment with the contrast, I can change it to the weird muddy black color. So I guess, it really has something to do with the contrast setting. Could it be that I have a faulty unit? \$\endgroup\$
    – Dakkaron
    Commented Jul 3, 2018 at 14:44
  • \$\begingroup\$ I figured it out, I need negative voltage on the contrast pin. Thanks for your help! \$\endgroup\$
    – Dakkaron
    Commented Jul 3, 2018 at 14:54
  • \$\begingroup\$ That's a non-standard solution right there. Glad you solved your specific issue, but it doesn't make sense \$\endgroup\$ Commented Jul 24, 2019 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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