I2C Mux

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted

Hi,

   

For my recent project I needed to use three different I2C buses, unfortunately I'm using PSoC5,

   

and apparently as for now you can't use more than two I2C modules for PSoC5 nor three 

   

I2C modules for PSoC3.

   

So, with some help of the support team and a couple hours of work and experiments 

   

I mannaged to desgin a component which uses only one built in I2C module which let you 

   

mux four different I2C buses. I found it very usefull. The drawback of this method is of course the speed 

   

limit of 100kbps.

   

I also made a simple I2C driver for this module and tested the component.

   

Is someone interested?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted
        An example project with the driver and the component inside...   

View solution in original post

12 Replies
rotec_264361
Level 2
Level 2

Mike,

   

have you tested 4 I2C channels @ 100 kbit/s? Guess sending data with 4 I2C implemented this way is OK, what about receiving data?

0 Likes
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted

 This is a I2C Mux, means that you can connect only to one I2C bus at a time. I've tested both receiving and sending data @ 100kbps  with no problem. Actually, I've tested also @125kbps and it took it with no problem. 

0 Likes
Anonymous
Not applicable

 Hi Mike

   

I saw, in a prevous post from you, that u had the MPU6000 I2C connection running on the PSoC5. 

   

I have tried everything including the code you posted back then. Apparently the problem is that my PSoC cant take the bus, because my I2C_1_MasterSendStart() returns I2C_MSTR_NOT_READY. 

   

Can u help me? How did you set up your I2C module on the PSoC?..

   

Sorry for being off topic, but i am kind a desperate here 🙂 ..

   

You can write to me at Texton1@msn.com if you can help. 

0 Likes
Anonymous
Not applicable

Oh sorry it was: 

   

 I2C_1_MasterSendStart() returns I2C_MSTR_ERR_LB_NAK

   

So for some reason I dont get an ack from the MPU6050?.. 

   

Again sorry for being off-topic.

0 Likes
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted

 Hi Texton,

   

I can help you, check your email.

0 Likes
Anonymous
Not applicable

Hi Mike!! Could you please share the solution for me as well, I got the same problem. please kindly send to ckai740@aucklanduni.ac.nz. Thanks so much

0 Likes

Welcome in the forum, Peter.

   

Seems as if this thread is a bit old (a few years). So when you have got an actual I2C problem do not hesitate to start a new question.

   

Tell us which kind (type) of board you use, what you want to control (Link to datasheet helps us a lot) and what you already tried (Project archive or workspace bundle).

   

 

   

Bob

0 Likes
kemic_264446
Level 4
Level 4
First like received

 Hi Mike

   

 

   

I would be interested in your I2C Mux, I have a board with a whole bunch of I2C chips on which all have the same address and I had to use external circuitry to to the MUX because Creator insists on a bidirectional pin, so I couldn't just use the buit in mux.

   

 

   

-Kenny

0 Likes
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted

Hi Kenny,

   

You're right, you can't implement this kind of component using the standard components.

   

Please contact me: mike.hersh@gmail.com

0 Likes
lock attach
Attachments are accessible only for community members.
MiHe_282546
Level 3
Level 3
5 sign-ins 10 questions asked 10 replies posted
        An example project with the driver and the component inside...   
Anonymous
Not applicable

 This is a very interesting component, but I have several questions.

   

The datasheet for BUFOE says that yfb gets y irrespective of x only when OE is 0. You have OE permanently enabled. I do see that you have the inout pin only capable of driving low, but I don't understand how BUFOE is allowing the pin state to be read back because OE is always 1.

   

The other question I had was regarding the speed; why was this design restricted to 100KHz?

   

Thanks,
Andrew

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

I was able to add 3 I2C masters to ma schematic without problems. Are you using the Fixed-Function block or the UDB-baseed components (I was using the latter)?

0 Likes