Shop OBEX P1 Docs P2 Docs Learn Events
Assigning BS2 an I2C Address,is it possible? — Parallax Forums

Assigning BS2 an I2C Address,is it possible?

CruxCrux Posts: 74
edited 2007-08-31 22:27 in BASIC Stamp
Is it possible to make a custom address for the BS2?I am planning on interfacing it with PIC16F877A

Comments

  • pwillardpwillard Posts: 321
    edited 2007-08-31 18:23
    Rather than answer if it's possible or not... you have me curious.

    You are wanting to make an I2C Slave with a Stamp? Making an I2C slave is a lot more complicated than talking to an I2C device as master. What would tha Stamp be doing as a slave that is not already done by existing I2C devices.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    There's nothing like a new idea and a warm soldering iron.
  • CruxCrux Posts: 74
    edited 2007-08-31 18:38
    I am planning to let the stamp and the PIC16F877A to talk to each other through I2C protocol. I think its possible but just wanted to get an idea from experienced people.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-08-31 18:38
    I assume you're using the PIC as as intermediary to the Stamp in order to provide it with I2C slave capabilities — such capabilities being impossible with the Stamp alone. Since the '877 mediates I2C bus transfers in software, there's no technical reason you couldn't assign it any address you want.

    -Phil

    Update: Oh, 'looks like our posts crossed in the tubes. The Stamp, as master, can talk to an '877 operating as an I2C slave, but not the other way around.

    Post Edited (Phil Pilgrim (PhiPi)) : 8/31/2007 6:43:25 PM GMT
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-08-31 20:48
    Most people use a single pin (or two pins, one each way) (plus a common ground) to talk using "SERIN"/"SEROUT" between such devices. That's usually a much more robust protocol, easier to implement, and doesn't have the "Oh, you can't be 'slave'?" limitations of I2C.
  • pwillardpwillard Posts: 321
    edited 2007-08-31 22:27
    You know, you might want to look into RS485 instead of I2C (It's essentially a daisy chained RS232 specification)

    See Nuts & Volts article #28 for examples.

    http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv28.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    There's nothing like a new idea and a warm soldering iron.
Sign In or Register to comment.