Shop OBEX P1 Docs P2 Docs Learn Events
I2C & propeller — Parallax Forums

I2C & propeller

Michael07Michael07 Posts: 12
edited 2007-11-29 14:35 in Propeller 1
confused.gif Hello - I just got PEK and two identical I2C devices with unchangeable I2C address (they both have the same address). How can the prop communicate with these two devices? Thank you

Comments

  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2007-11-29 04:58
    Hi Michael!

    Weclome to the forum.· Th PEK is the Propeller Educational Kit?· I pop in and out of the forum and miss new acronyms but I want to be sure it isn't something else.

    Tell us more about the I2C devices you have.· Usually you can have multiple I2C devices of the same type on the same bus.· These devices usually have a way to set the lower bits of the address by way of external address pins wired·high or low.· Can you share a datasheet or link to the devices you have?

    In the rare case that you really can't change the address then I am not sure why they are I2C devies because having a data bus is one of the reasons to have multiple chips.· That doesn't help you though.· One solution for multiple I2C devices with the same address that·can not·be changed is to have them on seperate pins.· It is a waste of pins, but it is possible.·

    Give us more details and we can try and help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2007-11-29 05:00
    It's not a lot of information to go on is it? What's the part number? Some have address pins you can set to offset the base address.

    *Peter*
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2007-11-29 05:47
    Michael07,

    One I2C "trick" you can try is to swap the SDA and SCL lines to each of the devices with the same address. To read "one" of them assign the SDA, and SCL lines one way, and to read the "other" device, assign the SDA, and SCL lines the other way.

    Note: Depending on the I2C device, sometimes this works, and if it does, you can effectively double the number of assigned devices to your I2C buss.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 11/29/2007 6:06:53 AM GMT
    1239 x 475 - 96K
  • simonlsimonl Posts: 866
    edited 2007-11-29 10:13
    Couldn't you run TWO I2C busses and corresponding objects? OK, that's two COGs used, but if you have no choice...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • Michael07Michael07 Posts: 12
    edited 2007-11-29 14:35
    smile.gif Thank to all of you for the help. It is good to know the propeller chip can handle more than one I2C buss. This is just for one time testing purpose so speed or I/O pins count should not be a concern.

    Thanks again.

    Michael
Sign In or Register to comment.