Shop OBEX P1 Docs P2 Docs Learn Events
ezLCD power on and off — Parallax Forums

ezLCD power on and off

BobValBobVal Posts: 48
edited 2005-11-25 22:01 in General Discussion
I am using a ezLCD that has a power on/off line.

The manual says:· +3.6 to +7v turns ON the ezLCD-002 power.· 0 to +1v turns oFF ezLCD-002 power.· Open leaves the ezLCD-002 power unchanged.
························· Tmin = 1ms, Rin > 250 KOhm

Can someone explain to me how to make a circuit that will allow the javlin to power on and off the ezLCD-002.

Thanks

BobVal

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-25 18:18
    Sounds like a digital input for turning power on/off.

    Connect an I/O pin via 1k resistor to that digital input.

    static final int ezLcdPowerOnOff = CPU.pin9; //power control pin

    CPU.writePin(ezLcdPowerOnOff,false); //turn power off

    CPU.writePin(ezLcdPowerOnOff,true); //turn·power on

    regards peter
    ·
  • BobValBobVal Posts: 48
    edited 2005-11-25 19:57
    This will turn it on but does not seem to turn it off.

    I think maybe their write up is wrong.

    BobVal
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-25 20:34
    From the ezlcd 002 manual:
    P
    ower ON/OFF
    When any of the above power sources is connected, the ezLCD-002 may be powered on by:
    · applying a positive voltage (2V to 7V) to the ON/OFF pin for at least 1 ms or
    · by pressing the ON button (Figure 6) on the back of the display
    The ezLCD-002 may be powered off by:
    · connecting ON/OFF pin to the ground for at least 1 ms or
    · by pressing the OFF button (Figure 6) on the back of the display
    · The OFF button has the priority over the ON button.
    When the ON/OFF/ pin is jumpered to the power source, the ezLCD power will be cycled by
    connecting and disconnecting the power source.

    So try this:

    Connect an I/O pin via 1k resistor to that digital input.

    static final int ezLcdPowerOnOff = CPU.pin9; //power control pin

    CPU.writePin(ezLcdPowerOnOff,false); //turn power off
    CPU.delay(15); //1.5 msec
    CPU.setInput(ezLcdPowerOnOff); //make pin floating

    CPU.writePin(ezLcdPowerOnOff,true); //turn·power on
    CPU.delay(15); //1.5 msec
    CPU.setInput(ezLcdPowerOnOff); //make pin floating

    regards peter





  • BobValBobVal Posts: 48
    edited 2005-11-25 21:27
    Peter:

    The on works fine, but the off does not seem to work.

    Thanks for trying.

    I think I will go with turning the backlight off and clearing the screen to either white or black (whichever turns of the pixels).·

    Because turning the power off on the ezLCD-002 will also stop the touch from waking it.· So I would have to add a push button to my design to wake up.· Where by clearing the display to an off pixel color (and not writing to it) will make the lcd act as off but when someone hits the touch pad I can notice that and start drawing to the screen again and allowing input.

    So seeing as you know alot, is turning all the screen white the same as setting off the pixels or do I have to turn the screen black to shut them off?· I have tried it both ways and I think white is what I need to do or at least it seems to look off then where the turning them black appears to be off but stands out more?

    Thanks again

    BobVal
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-25 21:45
    Ok, so making the pin just an input is not enough.

    As I understand it, a voltage between 1V and 2V at the on/off pin does not change the power state.

    Try this (resistor divider):

    +5V --<3k3>---+---<1k5>-- GND

    connect + point to both Javelin I/O pin and ezlcd power on/off pin.

    Making the javelin pin an input will leave (1500/(1500+3300))*5V = 1.56V on + point.

    Try the code now, this may work.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-11-25 22:01
    If it does not work, try using CPU.delay(100); //10 msec

    instead of CPU.delay(15);

    Maybe the ezlcd is less sensitive than specified in the manual. 10 msec should

    really be enough.

    regards peter
    ·
Sign In or Register to comment.