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 ==================================================================