On 06/30/2012 04:27 PM, Chuck Guzis wrote:
I use both
regularly. SPI is inferior in some ways, but superior in
others. I personally prefer I2C, but there are situation in which SPI
is a better choice. It is MUCH faster (I2C tops out at 400KHz, I've
seen SPI up in the several-MHz range), and I2C's transfer size is
fixed at eight bits, while SPI can transfer arbitrary word widths.
(this is handy for, say, ADCs and DACs).
Indeed, let's see you access an SDHC card using I2C at, say, 20MHz.
Very true. :-) But for a real-time clock or a few kB of EEPROM,
400KHz is usually just fine. It's rare for any of my designs for work
to not involve both SPI and I2C.
-Dave
--
Dave McGuire, AK4HZ
New Kensington, PA