Truncated match.
PICList
Thread
'Switching between SPI and I2C'
1998\05\26@162525
by
John Bellini
I am writing a program that will require me to switch between SPI mode
and I2C mode on the PIC.
Has anyone ever done this before?
Has there ever been any problems in doing this?
Any tips?
John Bellini
Product Development
Firmware Technologist
1998\05\27@131947
by
Andy Kunz
|
At 12:58 PM 5/26/98 -0700, you wrote:
>I am writing a program that will require me to switch between SPI mode
>and I2C mode on the PIC.
>
>Has anyone ever done this before?
>Has there ever been any problems in doing this?
>Any tips?
Yes, I've done it with no problems.
Make sure that you disable the SPI part before beginning I2C comms.
It helps to issue the sequence
START
STOP
START real transmission
to get going, in case the I2C state machine is confused.
To begin SPI communications, do an "invalid" START (wrong edge first) on
the I2C lines, then select the SPI device. Note that idle conditions for
SPI are low/low, and for I2C are high/high, so if you do this you are
forcing the I2C into an invalid state to which it won't respond.
Also, try to do _fast_ SPI so that the I2C won't have sufficient setup times.
Andy
==================================================================
Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA
==================================================================
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- Today
- New search...