# SPI GPIO Pins

If you're using TLC5940 chips with your controller setup, either with the official expansion boards or with your own custom circuitry, you'll need to attach a couple of the TLC5940 pins to special pins on the KL25Z that connect internally to an on-board subsystem called the SPI Controller.

The pin selector on the configuration page automatically shows you the valid choices for each pin requiring an SPI function, so you just need to choose from the available pins.

The reason that such a small number of pins is shown for each SPI connection is that these are the only pins the KL25Z hardware allows for these functions. The KL25Z's internal wiring makes the SPI Controller reachable only through a very limited set of pins.

(You don't need to know the following details to set up your controller, but in case you're curious: SPI stands for Serial Peripheral Interface, which is one of those electronics-industry standards, in this case for connecting different digital devices together for communications and control functions. The TLC5940's control interface is compatible with SPI, and the KL25Z has a dedicated SPI hardware module, so it's a perfect match to connect the two devices using this module. The big benefit of doing so is that the SPI module works autonomously, freeing up the KL25Z CPU to do other work while TLC5940 data transfers are taking place. Without the hardware helper, TLC5940 communications would impose a very high workload on the CPU, which would cut into our ability to perform other functions, such as monitoring the plunger sensor and sending joystick updates to the host PC.)