Hello! First of all, I want to say hello to everybody since this is my forst post.
I have a problem related to an LCD. I am developing a battery-powered datalogging application, and most of the time, the LCD connected to the device has to be turned off. When a button is pressed, the LCD has to dysplay a message. Therefore, at the time the LCD is powered off, I put the port driving it to High Z Digital, and just before having to display the message, I make the port Strong Drive. However, the LCD does not show the message correctly, or not at all. the program halts here, and semms to remain in one of the LCD functions. When I do not change the GPIO drive mode, everything goes fine.
Does anybody have an idea on what could be wrong?
Yes, I use a LCD module (RC1602B-FHW-CSV) and I run the initialization function again. However, it works fine only at the start, till first time it is powered off. Then, although I use the initialization, it does not display correctly messages any more.
Which LCD-usermodule are you using in your project? When using the LCD_Char there is one pin used as input.
Are you accessing the LCD-module after sleep with a changed clock frequency? There are some delays that rely on a CPU-clock that did not change.
Hello again! I finally solved it. After powering down and the up again, LCD_Start and also LCD_Init have to be run, it seems. If not, the LCD_Init is not run by LCD_Start. However, a signifficant delay between the two has to be inserted (for me, 1second works).
Thank you for your help and quick responses!
glad that you solve your problem, but why it takes such a long time. We had a project that needs to re-start the LCD after removing, but don't think it takes that long.
If you look at the Hitachi 44780 datasheet there is nothing in it
approaching the need for 1 sec delay. I agree with HL that something
is not right, and needs further investigation. Using a 1 sec delay seems
like a time bomb in the design not knowing why you needed that long a
Keep in mind that delay is added on top of PSOC starup delay, so its
effectively even longer.
You don't have a long slow ramp on power that might be effecting LCD ?
It has no spec on power supply ramp rate, and with an internal osc I would
be suspicious the part could have issues handling a real slow ramp.
1. Do you put the psoc in a sleep mode as well, or you just remove power to the LCD module and the PSOC is still running at normal speed?
2. The LCD uses only 7 bits of a port, what is the other bit used for?