Shop OBEX P1 Docs P2 Docs Learn Events
SEROUT in Open Mode with LCD — Parallax Forums

SEROUT in Open Mode with LCD

glennwglennw Posts: 8
edited 2009-03-15 17:05 in BASIC Stamp
Hi All,
I have been using the parallax 2x16 LCD serial display quite successfully, but since I am working on a battery application, I wanted to add a power saving mode when the display is not needed. To do this I added a high side pnp transistor controlled by one I/O pin to turn off the +5v to the display. What I found was without somehow disabling the serial data into the display, voltage (and current) was "leaking" into the display module from the data input. I then tried to change the data from the BS2 SEROUT pin from driven mode to open mode. Now I have problems and the display is garbled.

Initially my driven commands looked something like:
SEROUT 15, 32, [noparse][[/noparse]17] since I was using 19.2 kbps

Using the conversion documented in the SEROUT help, I then changed to:
SEROUT 15, 49184, [noparse][[/noparse]17] since I wanted to continue using 19.2 kbps and an inverted mode with a pull down (open source)

Can anyone tell me what I am doing wrong?

Thanks,
Glenn

Comments

  • rixterrixter Posts: 95
    edited 2009-03-14 22:35
    Glenn,

    Have you determined that power consumption is still too much of an issue when you use the command to turn off the display? (DEC 21). I believe this command preserves what was on the screen and restores the display with DEC 22.

    Rick
  • glennwglennw Posts: 8
    edited 2009-03-14 22:42
    Rick,
    What I have found is that the display off command really doesn't have much effect on LCD power drain.

    Glenn
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-03-14 23:51
    Hi Glenn, your original configuration was working fine in true mode (baud 32 =19200 true) , to maintain the same polarity in open mode the baud value should be 32800, could this be your problem?

    Jeff T.
  • glennwglennw Posts: 8
    edited 2009-03-15 01:17
    Jeff,
    The way I thought I needed to go was with the inverted mode since I wanted the open source configuration (resistor to ground) otherwise I am still supplying current to the module via the pull up resistor; hence the inverted mode (32800 + 16384 = 49184). What do you think?

    Glenn
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-03-15 03:06
    Hi Glenn, I would stick with true mode. Why not tie a 10k -100k resistor to P15 and VSS and when your not using the serial port give the LOW 15 instruction then when your transmitting again :- HIGH 15 ,SEROUT

    Jeff T.
  • glennwglennw Posts: 8
    edited 2009-03-15 17:05
    Thanks Jeff,
    I had thought about that, but after your suggestion actually tried it. I just used the LOW 15 (not using any resistor) command to make sure there was no data going to the display module. When I wake everything up, my SEROUT commands take over and everything is fine. This way I save the 20mA that the display module uses when the program is in the power save mode.

    I still am a little frustrated that I couldn't get the open mode to work the way I thought it should, but I'll leave that exercise for another day.

    Thanks again for your responses.

    Glenn
Sign In or Register to comment.