I2c slave
David Betz
Posts: 14,516
in Propeller 1
Can the P1 be used as an i2c slave? I’d like to attach it to the i2c port on a Raspberry Pi and also use 4 instances of JonnyMac’s 1-wire object to act as sort of an 1-wire expander plus a little logic. I seem to recall that being a SPI slave was difficult and wondered if i2c had similar problems.
Comments
A quick search - https://obex.parallax.com/obex/i2c-pasm-driver-i2c-spin-driver-i2c-slave-driver-pasm-lots-of-demos/
I haven't examined it myself.
If you're writing the code for both sides, maybe serial is an easier way to go. I haven't used the RPi in a while, but doesn't it have a secondary serial port on the IO pin? This would let you receive a command, process the command, then send [tagged] results back. With I2C or SPI you're a slave to the RPi's clock, which may be tricky.
Probably a good idea but I’m already using 5 UARTs on the Pi. I think it has 6 though so it might work.