Shop OBEX P1 Docs P2 Docs Learn Events
Sharing 4X20 LCD between stamps — Parallax Forums

Sharing 4X20 LCD between stamps

GuidoGuido Posts: 195
edited 2007-04-21 17:06 in BASIC Stamp
I am trying to share one LCD between Stamps. I know I am having a problem doing this. If I use the following statement in all the stamps:

LCD············ PIN·· 4··························· ' SERIAL LCD OUTPUT TO DISPLAY

SERIN SIOPIN\FCPIN,T9600,[noparse][[/noparse]DEC LCDCNTRL]····· ' A numberic number to tell stamp What Stamp can have control of LCD out

It just does not want to work. I think part of the problem is the state of Pin 4 is grounded when no data is being sent. Is there a way to set this pin in limbo?
Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-21 16:28
    The only way to "set this pin in limbo" is to make it an input (like with INPUT LCD).

    When you connect several Stamp pins together, you run the risk of burning out the I/O pins if two of them are set to outputs and to opposite states (LOW and HIGH). To prevent this, you MUST use a protective resistor (like 220 ohms) in series with the I/O pin between the Stamp and the common point. This limits any short circuit current so that it won't destroy the Stamp's I/O pin.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-04-21 16:59
    I think with this circuit that two Stamps should be able to "share" an LCD (see dwg attached), nothing like diode-OR'ing.· This will only work with the P0-P14 I/O pins (please, not the BoE/HWB 9-pin connector.)· This circuit doesn't prevent conflict resulting in garbled thus & sundry at the LCD, but nobody will get hurt in the process.·

    [noparse][[/noparse] Suggest using 1N4001, 1N4000-series,·diodes.· A·small-signal would probably suffice, but let's not go there. ]
    329 x 302 - 10K
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-04-21 17:06
    If you use one of the "Open" SEROUT modes, you should be able to control the LCD from two BS2's. You'll nee a 'pull-up' resistor (or pull-down resistor). And I'd put 2 220 ohm resistors in series between the BS2's also.

    And you'll have to deal with any "message collision" somehow. On second thought, maybe the diodes are a better idea.
Sign In or Register to comment.