I2C on which device???

Hy everyone!

I am not shure if every arduino (mini to mega) is able to use I2C so I am asking you ....

Is it possible to use every arduino to make I2C working on it?
Is it only necessary to "define" the right port?
I read a lot about using analog port 4 and 5... are these exclusive?
Is it possible to use i2c on every other analog port?

hope to get some answers from you..

have a nice weekend... :slight_smile:

Unlike low-speed serial, it isn't really feasible to run I2C via software, so you're stuck with using the hardware which can only use the analogue pins 4 & 5.

it isn't really feasible to run I2C via software

It is have have done it many times on Acorn machines and PIC processors without hardware support. A master I2C is a lot easer than a slave because the master is always in charge of generating the clock signals. It is a bit messy but can be done.
Also because it is a synchronous serial signal the actual clock frequency is not too important because you generate the clock as well.

I2C is supported on the mega but the pins are fixed as the software uses the hardware support. On the mega the I2C lines are not the same as the other boards this is Pin 21 for the clock and Pin 20 for the data. But on all other processors it is Analogue 4 & 5.

Is it possible to use i2c on every other analog port?

Only if you are prepared to write a software I2C driver, there is not much point in doing this apart from the learning exercise as you can do lots of thing with external multiplexing if you need more devices or to counter address conflicts.

It is have have done it many times on Acorn machines and PIC processors without hardware support

You're quite correct, of course (though a 400kHz bus would be pushing it a tad), but if the OP had to ask the question, then no, it isn't feasible.

Yes it was 100KHz that I implemented.

but if the OP had to ask the question, then no, it isn't feasible

I quite agree with that, but it is so true of many posts we get here.

However there are people who lurk about the forum looking for projects to do, so maybe someone things this might be worth while. Personally I don't think it is worth it.

Thank's a lot for you answers!

I do not want to make my own Software for using i2C on an other port. There was only a small thinking about it :wink: if it is possible.

Am I right to say that on every board the i2C lines are analog 4 / 5 , only on mega 20/21. So I can use every board to make i2C connections...

thanks ...

So I can use every board to mac i2C connections.

Yes if mac is actually make and not the name of a computer.