Shop OBEX P1 Docs P2 Docs Learn Events
I2C among Props — Parallax Forums

I2C among Props

silverpegasussilverpegasus Posts: 3
edited 2009-08-11 20:26 in Propeller 1
Dear All...

Have anyone tried to connect 2 or more Props Chips, using I2C? How to set the "slave address" for each chips?


Aris

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2009-08-11 07:48
    I haven't used I2C between props but I have used a prop as both a master and a slave both seperately and at the same time and I dont see any reason why it wouldn't work just haven't needed to yet. The driver object I use you set the slave I2c pins and address when you initialiaze the obect.
  • Clock LoopClock Loop Posts: 2,069
    edited 2009-08-11 19:52
    I had wondered about this myself.

    And how it would work if each prop had an eeprom to boot from also.
  • TimmooreTimmoore Posts: 1,031
    edited 2009-08-11 19:59
    No problem with the eeprom, when I did a I2C slave. I had a bunch of I2C sensors on the same pins as the eeprom, some more sensors on another I2C bus on 2 more pins (because of some I2C address conflicts). and the prop as I2C slave bus on another 2 pins. So I had in total 3 I2C buses running on that prop.
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-08-11 20:06
    Tim, what I2C speed were you running all those at? (PS thanks for your work in the OBEX re I2C)

    Hi Silverpegasus - welcome to the forums...

    Do a search on "I2C" here and you'll find some code:

    obex.parallax.com

    - Howard

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • TimmooreTimmoore Posts: 1,031
    edited 2009-08-11 20:26
    The I2Cslave object was based on hippys original code. I fixed a couple of bugs and did a couple of other changes I needed.
    I posted it a while ago on the foums but I can't find the link. In terms of bus speed it wasn't very fast, for master bus I used a variant of basic_i2c_driver. but I was polling the devices at ~25/sec but 3 of the devics were ultrasonic rangers and I could only poll 1 at a time so nothing was particular fast. I was propably polling 6 devices each time.
    The master device that was accessing the I2C prop is pretty slow < 100Khz but it only got updated sensor values a few times per sec.
Sign In or Register to comment.