Exact match. Not showing close matches.
PICList
Thread
'[PIC] I2C vs SPI vs Microwire'
2000\06\12@152759
by
Hardware Engineering
I've seen quite a bit of traffic dealing with I2C, but what about SPI? Is
there a method to bit-bang for SPI? To be honest, I'm just starting to look
at this, so I don't have any specs. But if someone has some code snippets,
that would be nice.
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
2000\06\12@153009
by
Andrew Kunz
SPI is easier since you don't have ACK/NAK/STOP/START to deal with.
Just CS, CLK, DO, and DI.
It's a lot simpler if you just look at the wave forms. The problem is that
there are so many flavors. I've found it best to just bit bop whatever is in
the data sheet.
Andy
Hardware Engineering <spam_OUTpic-ineerTakeThisOuT
USA.NET> on 06/12/2000 03:26:13 PM
Please respond to pic microcontroller discussion list <.....PICLISTKILLspam
@spam@MITVMA.MIT.EDU>
To: PICLIST
KILLspamMITVMA.MIT.EDU
cc: (bcc: Andrew Kunz/TDI_NOTES)
Subject: [PIC] I2C vs SPI vs Microwire
I've seen quite a bit of traffic dealing with I2C, but what about SPI? Is
there a method to bit-bang for SPI? To be honest, I'm just starting to look
at this, so I don't have any specs. But if someone has some code snippets,
that would be nice.
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
2000\06\12@155914
by
Dan Michaels
|
YOu wrote:
>I've seen quite a bit of traffic dealing with I2C, but what about SPI? Is
>there a method to bit-bang for SPI? To be honest, I'm just starting to look
>at this, so I don't have any specs. But if someone has some code snippets,
>that would be nice.
>
I have no code for you, but in my experience SPI is **much** easier
to deal with than I2C. First, the exact coding is somewhat chip dependent.
I've done both SPI A/D and D/A converters, and the requirements were
different. Secondly, it generally takes at 1-2 extra lines, used for
chip enable/etc. Third, generally there is no special protocol, but
just flick CS, and send out 8 or 16 SPI clocks while reading/writing.
I have I2C bit-bang code taking about 250 bytes, involving about 6-8 RAM
variables, and custom SPI code of about 20 bytes, no RAM variables, and
which took about 10 minutes to write. Few grey hairs result from using
SPI, in my experience.
- Dan Michaels
Oricom Technologies
http://www.sni.net/~oricom
==========================
2000\06\12@161201
by
Dan Michaels
Addendum to previous:
The A/D and D/A chips were easy. OTOH, if you try using the
SPI serial EEPROM chips, get ready to suck gas.
- Dan Michaels
==============
2000\06\12@161611
by
M. Adam Davis
|
A good book which contains SPI code samples is "Serial PIC'n" by Roger L.
Stevens. You can read my review of the book here:
http://ubasics.com/adam/books/ser_picn.shtml
The book talks about both bit-bang SPI, and on chip SPI with real-world examples
(master, slave, A/D chips, display driver, data logger, daisy chaining SPI
devices, etc) as well as other serial communications ( I2C, Microwire, 1-wire,
RS-232, etc)
While I certianly would love it were you to buy it from amazon through the links
on my site (I get a buck or two), Peter Andersen sells it in the amazon zShops
for about $10 less than amazon sells it. Use the link on my site to look at the
amazon listing, and just under the listing it'll show you similar products
available in the zShops, one of which will be the less expensive version.
-Adam
Hardware Engineering wrote:
>
> I've seen quite a bit of traffic dealing with I2C, but what about SPI? Is
> there a method to bit-bang for SPI? To be honest, I'm just starting to look
> at this, so I don't have any specs. But if someone has some code snippets,
> that would be nice.
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
More... (looser matching)
- Last day of these posts
- In 2000
, 2001 only
- Today
- New search...