2004-05-13 01:20 AM
2004-05-11 11:55 PM
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 ]2004-05-12 01:02 AM
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 sjo2004-05-12 01:41 AM
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? Moppie2004-05-12 02:51 AM
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 sjo2004-05-12 03:13 AM
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 ]2004-05-12 05:17 AM
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 sjo2004-05-12 11:28 PM
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.2004-05-13 01:01 AM
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 sjo2004-05-13 01:20 AM
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 ]