Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
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.