This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2553: 16x2 LCD connected to the launchpad msp430g2553 by i2c: increase the contrast of the characters.

Part Number: MSP430G2553
Other Parts Discussed in Thread: MIDAS,

Hello everyone and thank you in advance.
I am testing a 16x2 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 characters 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. My question is, how does the contrast of the characters increase? The backlight adjusts it through the working cycle of the PWN which connects it to the anode (this works correctly). The initialization of the LCD is the one proposed by the manufacturer for 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 initialisation commands
{ 0x00,
    0x38,
    0x00,
    0x39,
    0x14,
    0x74,
    0x54,
    0x6F,
    0x0C, //Display On, Cursor On, Cursor Blink On
    0x01
};

.
.
.

And these are the values proposed by the manufacturer to initialize the 3V LCD:

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

Here is the datasheet: 

Do you have any idea why the characters contrast is so low?

Thanks and regards!

  • It does sound like a contrast issue.  Most LCD displays adjust the contrast using a potentiometer to adjust a voltage to the "contrast" pin on the display.  Your display appears to use I2C commands to adjust the contrast so you may want to try adjusting the values (per the datasheet, see pages 28 and 29) .

  • Hi Dubnet and thanks. I have looked at the datasheet but I can not understand it well. Even so, I have tried changing the values where the contrast is supposed to adjust, but I did not get any results. It looks with the same contrast. 

    I have tried with this configuration and there are no changes:

    .
    .
    .
    char TxData[] =     // Table of LCD display initialisation commands
    { 0x00,
        0x38,
        0x00,
        0x39,
        0x14,
        0x7F,
        0x5C,
        0x6F,
        0x0C, //Display On, Cursor On, Cursor Blink On
        0x01
    };
    .
    .
    .

  • I didn't study the datasheet in detail, but I seem to recall that there were some dependencies on at least one other setting in order for the contrast settings to take effect.
  • Thanks again. I've been rereading the datasheet and I see only as a constraint to adjust the contrast that the control follower has to be turned on. In the configuration that is proposed by the datasheet is activated (instruction 0x6F) and is one of the instructions with which I initialize the LCD. I have tested several instructions that adjusts the contrast (from 0x70 to 0x7F). And also the display is on (instruction 0x01) so I have run out of ideas to try more possible solutions.

**Attention** This is a public forum