Skip to content
MichaelMeissner edited this page Mar 17, 2020 · 24 revisions

SPI (Serial Peripheral Interface)

All ARM Teenys have at least 1 SPI bus, some have more than one.

Each SPI bus has 3 dedicated pins shared with all devices on the SPI bus:

  • MOSI -- data from Teensy to the device;
  • MISO -- data from the device to the Teensy; (and)
  • SCLK -- clock;
  • Each device has at least one additional pin per device (CS) that says the device is active;
  • Some SPI devices have a D/C pin that says whether the data being sent is data or command;
  • Some SPI devices have other pins, such as a reset pin.

SPI tutorials

First SPI bus

  • On ARM Teensies, the First SPI bus uses Pin 11 (MOSI0), Pin 12 (MISO0), and Pin 13 (SCLK0) as the standard pins
  • See the pinout cards for your Teensy for the Alternate pins (Teensy 4.0 does not have alternate SPI pins).
  • If you use the revision A-C Audio shield on the Teensy 3.2, 3.5, or 3.6 processors, you will need to use the alternate pin for MOSI0 (pin 7) and SCLK0 (pin 14), since the I2S bus used by the audio shield uses pins 11 and 13.

Special SPI pins for the first SPI bus for Teensy 3.2, 3.5, and 3.6

Some SPI displays on the Teensy 3.2, 3.5, and 3.6 systems have special optimizations if you use one of the special pins for both the CS and the D/C pins on the first SPI bus. Several of the pins are exclusive, in that if you use one of the pins for a SPI function, you cannot use the other (but you can use the pin for some other use). The pins are:

Clone this wiki locally