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
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
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
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
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.
Comments
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*
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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
Thanks again.
Michael