A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
I2C vs SPI - Paul - Mar 16 15:37:46 2009
Hi. Just been looking at I/O Expanders from Microchip, and you can get them in either I2C
or SPI. The only differences i can see are SPI can go faster, and I2C uses less pins. Is
that about it?
Thanks,
Paul
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: I2C vs SPI - Eirik Karlsen - Mar 16 16:38:54 2009
SPI:
master + slaves
3wire
simple code
high speed
'few' peripheral devs
I2C:
multi master + slaves
2wire
complicated code
low-medium speed
'many' peripheral devs
Paul skrev:
>
> Hi. Just been looking at I/O Expanders from Microchip, and you can get
> them in either I2C or SPI. The only differences i can see are SPI can
> go faster, and I2C uses less pins. Is that about it?
>
> Thanks,
> Paul
--
*******************************************
VISIT MY HOME PAGE:
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: I2C vs SPI - Dennis Clark - Mar 16 17:33:22 2009
Also:
> SPI:
> master + slaves
> 3wire
> simple code
> high speed
> 'few' peripheral devs
Needs 1 enable line per peripheral in addition to three lines.
>
> I2C:
> multi master + slaves
> 2wire
> complicated code
> low-medium speed
> 'many' peripheral devs
Peripherals have addresses, does not need enable lines.
> Paul skrev:
I like SPI because it is largely clock jitter tolerant and is easily
bit-banged. I2C can be bit banged too, but because it uses priority,
packets, arbitration code, etc. it's way more complex.
DLC
>>
>> Hi. Just been looking at I/O Expanders from Microchip, and you can get
>> them in either I2C or SPI. The only differences i can see are SPI can
>> go faster, and I2C uses less pins. Is that about it?
>>
>> Thanks,
>> Paul
>>
>> --
> *******************************************
> VISIT MY HOME PAGE:
>
> LAST UPDATED: 23/08/2003
> *******************************************
> Regards
> Eirik Karlsen
--
Dennis Clark
TTT Enterprises
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: I2C vs SPI - Wouter van Ooijen - Mar 16 17:36:48 2009
> I like SPI because it is largely clock jitter tolerant and is easily
> bit-banged. I2C can be bit banged too, but because it uses priority,
> packets, arbitration code, etc. it's way more complex.
Unless you want to use multiple masters you can forget about most of
those complexities. And most slaves don't stretch the clock.
--
Wouter van Ooijen
-- -------------------------------------------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: www.voti.nl/hvu
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: I2C vs SPI - Harold Hallikainen - Mar 16 19:03:47 2009
> Hi. Just been looking at I/O Expanders from Microchip, and you can get
> them in either I2C or SPI. The only differences i can see are SPI can go
> faster, and I2C uses less pins. Is that about it?
>
> Thanks,
> Paul
Every time I do I2C, I have to get out the logic analyzer and try to
figure out what I did wrong. Does it need a second start? What about ACK,
NAK, or whatever? SPI just works, and is MUCH faster.
Harold
--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: I2C vs SPI - Paul Laverick - Mar 17 18:23:59 2009
Thanks for the replies guys, will have a think and a play to see which i prefer
Paul
From: Paul
Sent: Monday, March 16, 2009 7:37 PM
To: p...@yahoogroups.com
Subject: [piclist] I2C vs SPI
Hi. Just been looking at I/O Expanders from Microchip, and you can get them in either I2C
or SPI. The only differences i can see are SPI can go faster, and I2C uses less pins. Is
that about it?
Thanks,
Paul

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: I2C vs SPI - Temtu - Mar 17 18:27:53 2009
One more thing to consider if you are thinking to use the I2C in harsh
environment (car, CNC etc..) ==> It can "hang"..
Met
----- Original Message -----
From: Paul Laverick
To: p...@yahoogroups.com
Sent: Tuesday, March 17, 2009 5:21 PM
Subject: Re: [piclist] I2C vs SPI
Thanks for the replies guys, will have a think and a play to see which i
prefer
Paul
From: Paul
Sent: Monday, March 16, 2009 7:37 PM
To: p...@yahoogroups.com
Subject: [piclist] I2C vs SPI
Hi. Just been looking at I/O Expanders from Microchip, and you can get them
in either I2C or SPI. The only differences i can see are SPI can go faster,
and I2C uses less pins. Is that about it?
Thanks,
Paul

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: I2C vs SPI - rtstofer - Mar 20 1:52:19 2009
--- In p...@yahoogroups.com, "Paul"
wrote:
>
> Hi. Just been looking at I/O Expanders from Microchip, and you can get them in either
I2C or SPI. The only differences i can see are SPI can go faster, and I2C uses less pins.
Is that about it?
>
> Thanks,
> Paul
>
It's true the SPI is MUCH faster but only if the circuit layout can handle the high
frequency. I usually try to keep my SPI stuff around 10 MHz.
I2C generally maxes out around 400 kHz.
Code for the I2C state machine is complex. Most incantations don't deal with bus hang.
Many uCs have SPI gadgets and the code is quite simple.
Given the choice, I would always choose SPI.
Richard
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Re: I2C vs SPI - Paul Laverick - Mar 21 9:21:08 2009
Hi.
I was thinking the same about SPI
Cheers,
Paul
From: rtstofer
Sent: Friday, March 20, 2009 3:35 AM
To: p...@yahoogroups.com
Subject: [piclist] Re: I2C vs SPI
--- In p...@yahoogroups.com, "Paul"
wrote:
>
> Hi. Just been looking at I/O Expanders from Microchip, and you can get them in either
I2C or SPI. The only differences i can see are SPI can go faster, and I2C uses less pins.
Is that about it?
>
> Thanks,
> Paul
>
It's true the SPI is MUCH faster but only if the circuit layout can handle the high
frequency. I usually try to keep my SPI stuff around 10 MHz.
I2C generally maxes out around 400 kHz.
Code for the I2C state machine is complex. Most incantations don't deal with bus hang.
Many uCs have SPI gadgets and the code is quite simple.
Given the choice, I would always choose SPI.
Richard

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: I2C vs SPI - Basic Poke - Mar 23 0:08:02 2009
SPI is much easier to write by yourself (bit bang) without any special hardware IO port,
it's quite easy in fact, search wikipedia. So I would suggest the I2C expander if you
want to buy one, so you don't have to handle all the details with I2C. Although I don't
know what software is required to handle the I2C even if you have a port.
BasicPoke
--- In p...@yahoogroups.com, "Paul"
wrote:
>
> Hi. Just been looking at I/O Expanders from Microchip, and you can get them in either
I2C or SPI. The only differences i can see are SPI can go faster, and I2C uses less pins.
Is that about it?
>
> Thanks,
> Paul
>
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: I2C vs SPI - mmk_tsm - May 1 18:14:49 2009
I would generally agree with all that has been said.
In addition to being trickier to use, I2C is also much slower.
For i/o expanders, Microchip have a very clever addressing feature built into their spi
i/o expanders (23S08 and 23S17). Allows use of multiple expanders on the same SPI chip
select line.
Mike.
> One more thing to consider if you are thinking to use the I2C in harsh
> environment (car, CNC etc..) ==> It can "hang"..
>
> Met
>
> ----- Original Message -----
> From: Paul Laverick
> To: p...@yahoogroups.com
> Sent: Tuesday, March 17, 2009 5:21 PM
> Subject: Re: [piclist] I2C vs SPI
>
> Thanks for the replies guys, will have a think and a play to see which i
> prefer
>
> Paul
> From: Paul
> Sent: Monday, March 16, 2009 7:37 PM
> To: p...@yahoogroups.com
> Subject: [piclist] I2C vs SPI
> Hi. Just been looking at I/O Expanders from Microchip, and you can get them
> in either I2C or SPI. The only differences i can see are SPI can go faster,
> and I2C uses less pins. Is that about it?
>
> Thanks,
> Paul
>
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )