PDA

View Full Version : LCD on/off



lerameur
- 2nd May 2007, 21:32
I have a wireless module wth an LCD. I want to save the batteries by turning off the LCD when not needed (the unit must continue functionning). I added a switch between the power and Vdd of the LCD. turns off ok, still get some very dim light back light. BUt when I turn it back on, I either get funny characters or black squares on the first line (2x16 lcd)
how would I go turning it back on with the proper data showing?

thnks
ken

skimask
- 2nd May 2007, 21:44
I have a wireless module wth an LCD. I want to save the batteries by turning off the LCD when not needed (the unit must continue functionning). I added a switch between the power and Vdd of the LCD. turns off ok, still get some very dim light back light. BUt when I turn it back on, I either get funny characters or black squares on the first line (2x16 lcd)
how would I go turning it back on with the proper data showing?

thnks
ken

You'll have to do an LCD reset. Add a 'FLAGS = 0' in your code with each LCD update, that should 'reboot' your LCD the first time you send characters to it after it's been turned back on. Your LCD has an MCU in it also and has to be initialized, just like a PIC. PBP does this for you (behind the scenes) as part of it's startup.
As far as turning it off, try moving the switch over to the ground...switch the ground in and out of the circuit and see what happens. Might take care of the dim backlight also.

lerameur
- 2nd May 2007, 22:07
I put the switch on the ground. Thjis way the backlight is turned off but I can still see the characters. I put an ammeter to see how much current the lcd was taking, and to my surprise, the current is the same with or with a light LCD. So I guess powering down the lCD to save energy (battery life) is useless

k

Darrel Taylor
- 2nd May 2007, 22:43
still get some very dim light back light.

That dim backlight is the result of the Digital inputs bleeding thru the ESD protection diodes on the HD44780, and providing a voltage on the VDD to the LCD. Even though the switch is Open. This will also power the LCD itself. (to some extent)

If you remove power to the LCD, you must also remove the digital levels from the inputs.

If you have an extra pin on the PIC, you can use it to detect when the switch is turned off. Then set all LCD data,RS,E outputs to High-Z (input).

When it senses that power has been restored, it can then set 'FLAGS = 0' to force an Initialization again. You only want to do that once per Power-up of the LCD.

But frankly, it would be better to control the LCD's power with the PIC, instead of a switch. A single transitor on an output PIN will do the job.

A pushbutton can be used to turn on the LCD, then after a period of time, the PIC can turn it off again by itself. Then, by having this control, it knows exactly when it needs to turn off the Digital lines too.

HTH,

skimask
- 3rd May 2007, 04:06
But frankly, it would be better to control the LCD's power with the PIC, instead of a switch. A single transitor on an output PIN will do the job.

Most LCDs (not including backlight) draw far less than 25mA, don't they?
Why can't the PIC pin itself supply the power for the LCD? Maybe a 2nd pin handles the backlight.

Melanie
- 3rd May 2007, 08:34
Most modern LCD's draw uA and not mA (excluding the Backlight). I usually control the Backlight with a spare PWM pin from the PIC so that the user can set their own comfort level for the intensity (do a search on the forum for Easy LCD Contrast or Easy LCD Backlight). Just turning the Backlight to OFF (switching-off the PWM in my case) is enough to reduce LCD Power Consumption by 99.99% and then gives you the right to claim that your product is energy friendly, contributes to saving the planet, reduces worldwide CO2 emissions, is the preferred product of purchase by Tree Huggers, Penguins and Panda's etc etc. Marketing department just loves this crap... the rest of your gizmo can suck your local Power Station dry, but switching that Backlight is the one visible thing that gives the end-user the perception that you're ECO-friendly. If you've got it, flaunt it - after all, you've nothing to lose!