Shop OBEX P1 Docs P2 Docs Learn Events
Need help with LCDOUT command, other pins affected — Parallax Forums

Need help with LCDOUT command, other pins affected

StampBeginnerStampBeginner Posts: 3
edited 2010-05-03 03:04 in BASIC Stamp
I searched the forum and didn't find anyone with the issue that I'm having.

I'm controlling a LCD using a BS2px, using the LCDOUT command. I'm using pin 1 as the enable pin for the LCD (the manual says you can select pin 0 or 1), and using pin 0 to power the LCD backlight.

It seems that after I turn on the backlight by doing:

HIGH 0

the light goes off when I execute the next line:

LCDOUT 1, [noparse][[/noparse]"Hello World"]

It seems like the LCDOUT command is bringing pin 0 low when it executes, because this doesn't happen if I put the backlight control on a different pin like pin 10. Is this normal? Why should Pin 0 be effected when I'm executing the LCDOUT command using pin 1? The same thing happens when I reverse the connections and code·by putting LCD control pin 0 and backlight control on pin 1.

Thanks in advance for your help.

·

Comments

  • rixterrixter Posts: 95
    edited 2010-05-03 01:00
    This is interesting. I agree that seems rather odd. In some implementations a second controller exists on the LCD (as with 4x40 LCD modules that I've used), that require you to use that other enable pin to write to the lower 2 lines of the LCD. That is to say that the rest of the lines running to the LCD from the Stamp are the same (DATA lines, RS & R/W) and the only difference is that you send an Enable to the appropriate controller that you are sending data to. Maybe the enable pins on 0 and 1 are mutually exclusive in that both controllers can't be addressed simultaneously by design. I'm assuming that because you've found that other pins work ok that you are concerned about "wasting" a pin. You could also control the back light in a "hard" configuration with a toggle switch to VDD instead of via a pin.

    rick
  • StampBeginnerStampBeginner Posts: 3
    edited 2010-05-03 03:04
    Rick,

    Thank you for that excellent explanation. It seemed like good organization to have pins 0-7 all dedicated to the LCD, but I see I'm probably going to lose the use of pin 0 or else risk unintended results. I'll have to experiment and see if any other functionality can be safely assigned to pin0.

    Thanks again,

    Larry
Sign In or Register to comment.