Electrical – 16×2 LCD connected to msp430g2553 launchpad by i2c: contrast issue

character-lcdi2cmsp430

I am testing a 16×2 LCD screen specifically the 'MCCOG21605B6W-FPTLWI' from 'MIDAS'. It is connected to the with the 'msp430g2553 launchpad'. The connections are described in the commented code fragment that I have attached in this message. The backlight adjusts it through the working cycle of the PWN which connects it to the anode (this works correctly). The character are written correctly on the LCD but the problem is the contrast, it is very very low. To see the characters I have to turn the LCD and at some angle you can see that there is written text. As is an LCD by i2c, the contrast adjustment is done by commands, not by any potentiometer.
As you can see in the code, I initialize the LCD as indicated by the datasheet for a 3V power supply:

/*

MSP4302553|         |LCDDriver
|Pin 1 Boost Capacitor 1
|Pin 2 Capacitor 2 N
|Pin 3 Capacitor 2 P
Vcc (3.5V) |---------|Pin 4 Vdd (Boost Capacitor 1)
Gnd |---------|Pin 5 Gnd
P1.7|---------|Pin 6 (SDA)
P1.6|---------|Pin 7 (SCL)
P2.5|---------|Pin 8 (RST)
P2.4|---------| A (Backlight Anode)
Gnd |---------| K (Backlight Cathode)

*/
.
.
.

char TxData[] =     // Table of LCD display initialization commands
{ 0x00,
    0x38,
    0x00,
    0x39,
    0x14,
    0x74, //Contrast set
    0x54,
    0x6F, //Follower control
    0x0C, //Display On, Cursor On, Cursor Blink On
    0x01
};

.
.
.

The initialization of the LCD is the one proposed by the manufacturer for 3V power supply:

INITIALIZE: (3V)
 MOV I2C_CONTROL,#00H ;WRITE COMMAND
 MOV I2C_DATA,#38H ;Function Set
 LCALL WRITE_CODE
 MOV I2C_CONTROL,#00H ;WRITE COMMAND
 MOV I2C_DATA,#39H ;Function Set
 LCALL WRITE_CODE

 MOV I2C_DATA,#14H ;Internal OSC frequency
 LCALL WRITE_CODE
 MOV I2C_DATA,#74H ;Contrast set
 LCALL WRITE_CODE
 MOV I2C_DATA,#54H ;Power/ICON control/Contrast set
 LCALL WRITE_CODE
 MOV I2C_DATA,#6FH ;Follower control
 LCALL WRITE_CODE
 MOV I2C_DATA,#0CH ;Display ON/OFF
 LCALL WRITE_CODE
 MOV I2C_DATA,#01H ;Clear Display
 LCALL WRITE_CODE

I have tested with various values of the commands that can cause the characters not to be seen: 'Display ON / OFF', 'Follow Control' and 'contrast set' but without any result. It always looks with contrast practically 0. Do you know why the initial configuration proposed by the manufacturer does not work?

This is the datasheet: MIDAS LCD 16X2 Datasheet

Best Answer

Using the correct bias voltages is essential to get the correct contrast on LCD displays. An incorrect bias voltage could cause the low contrast which you described.

My hypothesis was that this LCD display is really optimised for 5V, and contains a capacitor charge pump (hence the need to add two capacitors) to double the supply voltage in order to generate the required LCD bias voltage, when used with a 3V power supply.

As we see in the datasheet, they use terms "voltage converter" and "voltage booster" for this functionality, although they don't explain that capacitors are only part of the charge pump; the other charge pump components must be already built into the display's PCB.

Based on its name, I expected that the output of the charge pump was the "VOUT" pin, and that is why I suggested measuring the voltage there, expecting something like 6V (i.e. the 3V supply voltage doubled by the charge pump to ~6V).

This was my troubleshooting suggestion, originally a comment:

Can you measure the voltage between the VOUT and VSS pins, with a DMM set to measure DC volts? I believe VOUT is the output of a capacitive voltage doubler built-in to the display's PCB, so I'm hoping for something around 6V on VOUT.

From your comment, that was indeed the area of the problem:

You were right, the VOUT is the output of a capacitive voltage doubler built-in to the display of the PCB, VOUT is around 6V. I measured it and it was only Vcc (around 3V) so I detected that there was a bad connection on my prototype board. I reconnected everything again and it works perfectly.