Electronic – Do I need SS for SPI single-slave communication

atmegapwmspi

I'm using Atmega328 as a master in SPI communication with a single slave. Is there a way to avoid using the SS (slave select) pin for SPI? That pin can also be used for PWM output, which I would like to use.

Best Answer

Whether or not you can tie a SPI slave's "select" input permanently active depends on both the specific slave and the overall system design. Some slaves rely on edges on their select inputs for things like flow control and/or byte alignment.

In some systems, in which the master and slave are always reset together (e.g., via power cycling) and never experience clock glitches, you can get away with it, but it is safer (more reliable) to plan to include an active slave select in your design.