LCD characters not showing in bright mode. Almost invisible.

Hello. First of all, sorry for possible bad english.

This is not exactly an arduino topic, but an LCD (same as the one with arduino or compatible) one.

I don't know if some of you know the openwrt / LEDE project. It's a linux distribution for installing in some routers.

Some routers have GPIOS. From which, we can control an LCD. For example 1604...
Its using IIC (I2C)
I tried it. And I almost got it. Following an internet tutorial, a howto, I almost did it, But then I had a problem:

If I don't initialize the LCD, the text characters bright and are perfectly visible. But when I initialize it...
The text in the LCD is almost invisible.
See the difference:

In The second image, the text says: "HOLA MUNDO" (Hello world, in spanish).

Does anyone know why is this happening and how can I get the characters look bright like in the first image?

Thank you.

The thread in the forum about this is in (spanish):
LCD not showing bright. Almost invisible.

Thank you.

This is the initialization script:

 INST_SET=0x0C
  INST_SEND=0x08
  CHAR_SET=0x0D
  CHAR_SEND=0x09

func_init() # inicializar display
{
func_LCD I 0x33; func_LCD I 0x32; func_LCD I 0x28; func_LCD I 0x0C; func_LCD I 0x01
}

func_LCD()
{
  local nibb; local data
  if [ $1 == "I" ]; then
    data=$2
    nibb=$(($data/0x10*0x10)); i2cset -y $BUS $ADDRESS $(($nibb+$INST_SET)) $(($nibb+$INST_SEND))
    nibb=$(($data%0x10*0x10)); i2cset -y $BUS $ADDRESS $(($nibb+$INST_SET)) $(($nibb+$INST_SEND))
  fi
  if [ $1 == "C" ]; then
    data=$(printf "0x%02x" "'$2")
    nibb=$(($data/0x10*0x10)); i2cset -y $BUS $ADDRESS $(($nibb+$CHAR_SET)) $(($nibb+$CHAR_SEND))
    nibb=$(($data%0x10*0x10)); i2cset -y $BUS $ADDRESS $(($nibb+$CHAR_SET)) $(($nibb+$CHAR_SEND))
  fi
}

(It's linux script syntax)

If I don't initialize the LCD, the text characters bright and are perfectly visible. But when I initialize it...

Perhaps your initialization sequence (or technique) is incorrect. The sequence 0x33, 0x32, 0x28, 0x0c, 0x01 does not look at all familiar although some of these values may deal with your I2C interface, not the LCD.

Information about the correct initialization sequence can be found by following the LCD Initialization link at Don's Collected Technical Information.

Don

But the characters look like garbage when "bright".

Don,
Won't there be a difference in pixel contrast/brightness if the LCD is in 1 line mode vs 2/multi line mode?
i.e if the LCD is incorrectly initialized to 1 line mode pixels will be brighter than in 2 line mode

--- bill

That's correct - because of the difference in multiplex rate.

Maybe all he has to do is adjust his contrast potentiometer.

Don

Hello; thank you for your answers...

The potenciometer is at the maximum level. Also, The 1 line mode or 2 lines mode... doesn't make a sense. A mate of the forum (the autor of the howto), has the same lcd screen, and his screen is displaying the characters in bright mode. And he (supposingly) uses the same init sequence.

This wkeekend I'll test by soldering the screen on the gpios of other router and will test again.

The 1 line mode or 2 lines mode... doesn't make a sense.

In this context the term 'line' has to do with the memory configuration, not the configuration of the characters on the screen.

If you do not initialize (do not use the 'initialization by instruction' technique) the LCD controller, by default, is set up to use one line of memory and a 5x8 dot character font. The duty factor for the display is then 1/8.

If you initialize the LCD controller to use 2 lines of memory (the only other choice) the duty factor for the display is 1/16. Since each pixel is powered for half as long as in the other case it will not be as bright.

Don

Thank you, guys.

The problem is solved. It was a bad contact in wires problem.