Microcontrollers 16 - I2C Serial
The purpose of I2C was to create a serial bus for multiple devices with a low pin count and a high speed. You will find most devices out there will communicate either through SPI or I2C, again it all depends on the application of which one to use. If you search the subject on the internet there is a huge debate of which one to use, I will leave that up to you but again it all depends on the application. Personally I will always choose SPI just due to it's simplicity, speed and low error. Using SPI is perfect for my applications since I only use a low count of devices and to me foot print is not all that much of a concern. So why go for I2C, well the great thing is that it only requires a total of two pins on your chip and can support up to 128 devices on a single bus.
There are three main speeds at which the I2C bus can run at, 400kbit/s, 1Mbit/s and 3.4Mbit/s. All I2C devices will run the slowest speed and many of them will support 1Mbit/s however 3.4Mbit/s is very uncommon due it's unreliability at high speeds. Another thing you need to remember is that each input has a certain amount of capacitance, the more devices the more capacitance and therefore the slower speed. In general you can fil the whole bus at 400kbit/s but you may loose bits due to noise, 1MHz would be a disaster. The real issue with I2C is capacitance and noise which is the reason for the much lower speeds where compared to SPI, this is due to the inputs / outputs being open drain and requiring a pull up resistor.
Extender or repeater.
Skip this chapter, I have yet to write it.