Shop OBEX P1 Docs P2 Docs Learn Events
I2C question — Parallax Forums

I2C question

HermieHermie Posts: 36
edited 2009-09-13 01:17 in BASIC Stamp
Just got a couple of BS2p's hoping to connect two together thru I2C, the same basic way as serin/out. Is this possible or is the master/slave issue a problem. If so, can anyone offer a sample routine?
If it's not possible, my second option would be to connect thru I2C multiple stamps to the same LCD display which is I2C capable, is that possible?

Thanks...Hermie

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-12 23:28
    1) The BS2p can only function as an I2C master, not a slave. You can't connect two stamps via I2C. You could easily connect two Stamps using a serial party line. There is an example in the Stamp Manual in the sections on SERIN/SEROUT.

    2) You can't automatically connect two Stamps to a single I2C peripheral. The I2C protocol allows for multiple masters, but the Stamps don't directly support it. You have to have the Stamps negotiate separately which one is to use the shared LCD display, then only one Stamp will issue the I2C commands at a time and you have to make sure the I2C pins are set to input mode when it's done (and before the other Stamps are notified that the LCD is available).
  • HermieHermie Posts: 36
    edited 2009-09-13 01:17
    That's what I suspected....thanks for the help mike!



    Hermie
Sign In or Register to comment.