Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
MEGARF SPI as Slave Example for stk600-rc044x Documentation

Introduction

This example demonstrates how to use MEGARF SPI module in slave mode.

Main Files

drivers/spi API

The SPI driver API can be found here.

Device Info

All AVR MEGARF devices can be used. This example has been tested with the following setup:

  • STK600 with ATmega128RFA1 on STK600-RC128X_RFX.

Description of the example

In This example Usart is configured in SPI master mode and SPI module is configured in slave mode. Usart SPI master will transfer the data to slave. SPI slave also sends data to Usart master when master sends the read command to slave. Received data validation is done on both the sides. If the received data matches with the transmit data then LED will glow.

Compilation Info

This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.

Contact Information

For further information, visit Atmel AVR.