P2 smart pins I2C and SPI mode 3 configuration!
Does anyone have an example of I2C bus using the smart pins? I am currently bit-banging the bus and it works but looks like the timing isn't ideal. I would like something a bit more reliable.
I know I can bit-bang SPI and get fairly decent results at low speeds but fear that at higher speeds say like 4 or even 8 MHz I would need to use the P2 smart pins to clock data in and out reliably. The application I am using the SPI bus for requires high reliability. The SPI bus will be controlling high-power stepper drivers and the bus will be active the entire time sending control data and receiving status information.
I have found a few discussions here and there about SPI but nothing much about smart pins and SPI. Does anyone have examples of SPI mode 3? I need to send 40 bits per transaction (five bytes). The chips will be daisy-chained to create a long shift register. So this long shift register would be 40 bits x the number of drivers connected to the bus.
Any help is greatly appreciated and I know you all don't disappoint