Questions on the Wire library- I2C

I'm using I2C for the first time.

Having read the I2C spec, I see that the I2C interface supports 3 different transfer modes: Standard (up to 100kbits/s), Fast (up to 400kbits/s), and HS Mode( up to3.4Mbits/s).

Which of these are supported on the Arduino with the Wire library? How does one go about selecting these modes?

I'm also confused regarding the 7 & 8 bit addressing. The documentation for the Wire library states

"If you have a datasheet or sample code that uses 8 bit address, you'll want to drop the low bit (i.e. shift the value one bit to the right), yielding an address between 0 and 127."

What do you do if the address of your I2C peripheral is > 127?

What is so difficult about implementing 8-bit addressing in the Wire library?

Thanks

I will attempt to answer the addressing question.

There really is no such thing as an 8bit address. There are only 7 and 10 bit addresses. I will only talk about 7bit addresses in this post.

When the I2C master sends a command the first byte of the command is the 7bit address along with the read/write bit in position bit 0.

Some datasheets will give you the 8bit address, which is the 7bit address that has been shifted left by 1 bit. If you ever see a datasheet that gives you an 8bit address you will notice that bit0 is always clear because that is the position for the read/write bit.

The Wire library will take the address you give it and and place it in bit7-bit1 in the first byte of the command and then set bit0 appropriately for read or write. If you give it an 8bit encoded address by mistake, the address that will get addressed on the bus will be shifted left by 1 bit. You would end up trying to address a device with an address twice the value of what you intended.

cappy2112: What do you do if the address of your I2C peripheral is > 127?

If King Arthur were alive today, would he have diamonds in his crown?

The important thing here is, King Arthur isn't alive.

http://en.wikipedia.org/wiki/I2c

The reference design, as mentioned above, is a bus with a clock (SCL) and data (SDA) lines with 7-bit addressing.

Since the design supports a 7 bit address, the question of how to handle an address > 127 doesn't arise.

What is so difficult about implementing 8-bit addressing in the Wire library?

The fact that it would contradict the reference design.