cancel
Showing results for 
Search instead for 
Did you mean: 

Init LCD

marco32
Associate II
Posted on May 13, 2004 at 10:20

Init LCD

9 REPLIES 9
marco32
Associate II
Posted on May 12, 2004 at 08:55

After hardware reset, the init of the LCD by the ST7 is going well.

But sometimes the init will fail:

After programming of the ST7 (not so importend)

After an quick power lose (power switch on-off-on), The ST7 gets an reset!

The LCD show strange characters or nothing

The timing of the signals is according to the datasheets.

Anybody suggestions, how to solve it

Has the LCD an software reset?

Moppie

[ This message was edited by: Moppie on 12-05-2004 12:28 ]
sjo
Associate II
Posted on May 12, 2004 at 10:02

How many times are you sending the lcd function set (8bit).

I have found sending it 3 times before changing mode gives the safest reset.

Some maunfacturers do not state this.

eg.

to setup for 4 but mode I do the following:

from poweron give at least 50ms before initialising display, then

system_set_8_bit

delay 5ms

system_set_8_bit

delay 5ms

system_set_8_bit

delay 5ms

system_set_4_bit

reset of setup etc.

Regards

sjo
marco32
Associate II
Posted on May 12, 2004 at 10:41

The powerup time is 20mS. I've rised it to 60mS.

I'm writing 1 time the function set. Also rised to 3 times.

There's no changing in the response of the LCD.

After powerup, the init of the LCD is going well.

Giving the ST7 a reset, the LCD gets trouble.

But after another reset at the ST7, the init of the LCD is ok!

I'm writing continously to the LCD.

Mayby the LCD gets an enable signal or something during the ST7 reset ?

Anybody?

Moppie
sjo
Associate II
Posted on May 12, 2004 at 11:51

Are you checking the lcd busy bit, or using a delay when reading/writing to the lcd?

Checking the busy bit is the safest method.

Regards

sjo
marco32
Associate II
Posted on May 12, 2004 at 12:13

I'am using a delay.

I know checking the busy flag is the safest method, but i don't have any io's for it.

But if you take a safe delay (prox. 0,8mS), isn't a problem?

Is it also a problem if the D4-D7 direct connected to the ground?

The problem will be in the startup, and there you can't checking the busy flag!

[ This message was edited by: Moppie on 12-05-2004 15:48 ]
sjo
Associate II
Posted on May 12, 2004 at 14:17

Taking into account the slowest command, you should delay 1.50-2ms.

What manufacturer display are you using, is it COG as I recently had a problem with a 3v COG module.

Regards

sjo
marco32
Associate II
Posted on May 13, 2004 at 08:28

I use the Winstar WH1602B display with KS0066 controller.

I checked the code, and i use 2 different delay

1 for the command writing = 10mS, and 1 for the data = 0,8mS

I will try the delay 1.50-2ms for data, but i don't believe in it!

Also checked with another LCD, with the same results.

What can i aspect? Must the LCD always give good resuls if there is a short power fail?

The LCD fails, when you see the characters fading out and the same time you switching the power on.
sjo
Associate II
Posted on May 13, 2004 at 10:01

Moppie,

Its starting to sound more like a supply problem (brownout), noise/glitch of the supply during the pwerdown/powerup stage.

Have you any filtering on the supply, also check rise/fall time of supply to make sure its in spec with the lcd requirements?

Regards

sjo
marco32
Associate II
Posted on May 13, 2004 at 10:20

I've made a test to find out a hardware or software problem.

I wait 5 seconds before i initialize the LCD.

When i switch the power off and the characters fading out, i switch the power on.

The last writing characters to the LCD comes up and after 5 seconds the the LCD will be initialise.

The LCD will be blank!!!!!

So my conclusion: There must be a software problem.

When i initialise 2 times the LCD everything is OK

Thanks so far for you're help Sjo

[ This message was edited by: Moppie on 13-05-2004 14:05 ]