Hi
I am using MSSP module in 18F4550 to talk to a 24LC16 EEPROM and TC77 temp sensor.
Only One chip will be connected at one time to PIC . I have two jumpers on board to select either device.(SCL, SDA or SDI SCK).
During run time I am checking I2C lines for pull up. If jumper is in EEPROM position that pull up will give pin as high and I will read I2C chip. otherwise I will read temp sensor.(My SPI part pins has no pull up)
While at runtime if I change these jumpers IIC engine is ok to switch between modes, but SPI module behaves erratically. If I switch to IIC and returns to SPI, temperature readings using SPI bus fail intermittently. But I2C is Ok always.
Simply changing to I2C and returning to SPI at runtime creates no problem. But in I2C if a read or write is done, then SPI loses balance.
Seems IIC engine is not 100% reset after it's operation to perform smoothly in SPI mode.
How I can completely reset I2C to a 'perfect start' to work flawlessly in SPI mode
Thanks
Roy Thomas