4.1 Master Side

The initialization of the SPI happens similar to the previous example. Similar to the master mode, the SS pin has to be set as output first and then the SPI can be enabled. The SPI interrupt is enabled by setting the SPIE bit in the SPCR.
Figure 4-1. Interrupt Controlled Master - Initialization and Transmission