General > General Technical Chat

I2C Multiplexer - Simple?

<< < (3/5) > >>

tom66:

--- Quote from: fourfathom on May 26, 2023, 11:06:40 pm ---Excellent points, but in my particular case I am accessing the two I2C devices inside of a tightly-timed ISR, where I cycle through all the I2C accesses I need to do and there's a well-defined timing deadband between device accesses.  For this reason there should be no issue of collision.  At least looking at the I2C bus activity doesn't show enough timing variation to matter.  I definitely wouldn't try this in a more general-purpose design.
Yes, I looked at the PCA9546A, and it's certainly cheap enough for this application, but the additional I2C traffic needed to set up the mux would slow down my available clock generator update rate more than I would prefer (I think).

--- End quote ---

If it's not clear from the datasheet, the '9546A is latching: you write the configuration, and it will keep that channel enabled until reset.  You do not need to prepend every transaction with a channel selection.  You only need to do that if the channel has to change.  So it depends on the application as to whether the extra 2 bytes would be problematic or not.

jwet:
Maxim had several app notes on this.  You don't need particularly fancy swtiches or anything.  Pullups are usually 1k to 10K, your Ron just needs to much less than this- 100 ohms- not difficult.  This was a common application for Maxim's small analog switches in all kinds of equipment.  Sometimes it was because a customer wanted to use a bunch of the same I2C part. There are several common conflicting I2C addresses and this keeps you from having to bit bang i2C, difficult.  Big I2C EEPROM were address hogs and conflicted with common RTC's like the DS1302.  Have fun.

NiHaoMike:
I assume the microcontroller you're using either doesn't have another I2C controller or it's already in use elsewhere?

jwet:
Also, you only need to do it on one line- the Data line IIRC.  You just have to keep from creating a start condition.

tom66:

--- Quote from: jwet on May 27, 2023, 04:49:07 pm ---Also, you only need to do it on one line- the Data line IIRC.  You just have to keep from creating a start condition.

--- End quote ---

If you have any slaves that clock stretch, you definitely need to do the muxing on all signals.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod