Hi,
I am designing a custom PCB that will mount 2 x Teensy 4.1 boards side by side that represent two sub-systems of the same project. Lets call them Teensy A and Teensy B. Teensy A needs to send some very light weight data to Teensy B, as it gathers info from its attached sensors/inputs etc. The data basically takes the form of a stream of numerical value pairs. The data is not bidirectional - it's just a one way stream.
I had initially assumed using one of the SPI busses would be ideal for this, except after doing lots of reading on this forum I now see that Teensy (or Arduino) as SPI Slave is not part of the official SPI library. I have previous experience using I2C between multiple Teensy 4.1 boards using Richard Gemmell's outstanding teensy4_i2c library - so that's an option I have up my sleeve... however for this particular application I just want a simple interrupt to happen when new bytes arrive at Teensy B so I wonder if a simpler type of serial data is more appropriate.
I'm just looking for some advice from anyone with experience on this - what the best interface to use for this scenario? Is a plain-old single wire Hardware Serial pin the way to go, with a pre-agreed data rate? Or does that expose me to potential errors without a separate hardware clock pin like SPI or I2C would use? Again, the two boards will be very close together, simply connected by traces on the same PCB that physically mounts them.
Cheers,
Josh
I am designing a custom PCB that will mount 2 x Teensy 4.1 boards side by side that represent two sub-systems of the same project. Lets call them Teensy A and Teensy B. Teensy A needs to send some very light weight data to Teensy B, as it gathers info from its attached sensors/inputs etc. The data basically takes the form of a stream of numerical value pairs. The data is not bidirectional - it's just a one way stream.
I had initially assumed using one of the SPI busses would be ideal for this, except after doing lots of reading on this forum I now see that Teensy (or Arduino) as SPI Slave is not part of the official SPI library. I have previous experience using I2C between multiple Teensy 4.1 boards using Richard Gemmell's outstanding teensy4_i2c library - so that's an option I have up my sleeve... however for this particular application I just want a simple interrupt to happen when new bytes arrive at Teensy B so I wonder if a simpler type of serial data is more appropriate.
I'm just looking for some advice from anyone with experience on this - what the best interface to use for this scenario? Is a plain-old single wire Hardware Serial pin the way to go, with a pre-agreed data rate? Or does that expose me to potential errors without a separate hardware clock pin like SPI or I2C would use? Again, the two boards will be very close together, simply connected by traces on the same PCB that physically mounts them.
Cheers,
Josh
Last edited: