Main Site Documentation

FEZ Cerberus change I2C-Pins or use I2C2


#1

Hello everybody.

I’ve still asked a similar question but i couldn’t find a solution… I’m programming with the FEZ-Cerberus and I use the I2C-Bus. I’ve got there about 10 different slaves which all work faultless. Only one slave (a I2C-Display) sometimes shuts down and blocks the I2C-Bus…

The Problem is, that every time the Display shuts down, the whole bus is hanging and i’m not able to communicate with the other slaves. to solve that Problem, my idea is to use a second i2c bus; i want to connect the Display to an own i2c-bus.

I could see at the FEZ-Cerberus-Schematics that the I2C1-bus is available three times:

Once at X2.8 / X2.9 and X1.8 /X1.9. but as much as i know, it’s the same bus. but there’s also a different I2C-Bus1 at X5.4 / X5.5 which is called I2C-1 too. I don’t understand the difference between These different Locations of the i2c1-bus…

and there is an I2C-2 Bus at X6.4 and X6.5. how can i use the I2C2-Bus???

In my initialisation i have got one I2CDevice and for every slave an own I2C-Configuration. everytime i write or read something, i Change the configuration of the i2cDevice to the configuration of the choosen slave and this works faultless. But in my initialisation, i can’t choose which I2C ( I2C1 at X1,2 or I2C1 at X5 OR I2C2 at X6) i want to use. how can i define or Change that?

thanks in advance, rfr


#2

@ rfr - You can’t select what I2C to use when you use hardware I2C.

You can try to use Software I2C and move device between these two buses.

https://www.ghielectronics.com/downloads/man/Library_Documentation_v4.3/html/920b9a97-8a97-a3e5-075a-82d09e8afe34.htm


#3

@ Architect - Hello Architect, thanks for your reply.

But why is there the I2C-Bus split to different Pins and why is there an I2C2-Bus available?


#4

You are welcome!

Certain functionality is multiplexed and can be enabled on multiple sets of pins (one set at a time). This provides flexibility when you design a board.

Schematics uses real names for the pins. Even though there is I2C2. NETMF firmware uses only one hardware bus for I2C by design.