Normally you cant directly mix a SPI and a I2C device on the same PIC Master Synchronous port. There is a risk that the activity on the SPI port will trigger an operation in a I2C device.
The 28X2 and 40X2 native PICs do have two such ports but the PICAXE only makes one available.
So if you are using the SPI port for a device already (on a PICAXE) how do you safely connect a I2C device on the same port ?
Do you 'just' need to turn off the I2C clock line into the iddle state such that the SPI device runs as normal, and the I2C device does not see the clock. Then when you want to access the I2C device, turn off the SPI device via its select pin, and turn on the I2C clock.
A soloution needs to be real small in board space terms, a SOT device or similar.
Analogue switch in the clock line, mini SOT logic AND gate, anyone tried these options ?
The 28X2 and 40X2 native PICs do have two such ports but the PICAXE only makes one available.
So if you are using the SPI port for a device already (on a PICAXE) how do you safely connect a I2C device on the same port ?
Do you 'just' need to turn off the I2C clock line into the iddle state such that the SPI device runs as normal, and the I2C device does not see the clock. Then when you want to access the I2C device, turn off the SPI device via its select pin, and turn on the I2C clock.
A soloution needs to be real small in board space terms, a SOT device or similar.
Analogue switch in the clock line, mini SOT logic AND gate, anyone tried these options ?