Re: about i2c and spi?
Both are serial communication interfaces. There are hardware and software differences between them. I2C works with two lines: a clock line ( SCL ) which outputs from master device and goes into slave device(s) and a data line ( SDA ) which is bidirectional. The maximum speed is usually 400khz. More informations about I2C is available at Philips. Check an I2C device datasheet ( ex. 24C02 memory) for details regarding protocol. SPI is another serial interface, but this one have 4 lines / slave device (chip select - CS , data in - SDI , data out - SDO, clock - SCK). Observe that here the datalines are separate. SPI interface allows data transfers at a higher speed compared to I2C, clock usually up to 2 mhz, depending on device. Take a datasheet for such device ( ex. AT25256 SPI memory from Atmel) to see protocol details.
/pisoiu