5 Conclusion
This application note has illustrated the basic SPI communication. When the SPI transmission is successful i.e. when the data received at the slave matches the actual data transmitted by the master via SPI bus, the value of ‘0xAA’ is written to PORD register. When the SPI transmission fails, the value of ‘0xF0’ is written to the PORTD register. This can be visually verified on STK600 with the help of onboard LEDs.