This repository contains examples of bare metal source code for Serial Peripheral Interface (SPI) as described in TB3215-Getting Started with Serial Peripheral Interface (SPI) document from Microchip. The repository contains a Microchip Studio Solution with multiple projects inside:
- Sending Data as Host: This example demonstrates how to configure the device in SPI Host mode and send dummy data (value 0) (for more details, see Sending Data as Host).
- Changing Data Transfer Type: This example demonstrates how to configure the device in SPI Host mode and to send data with respect to the clock polarity and the clock phase, in data mode 3 (for more details, see Changing Data Transfer Type).
- Receiving Data as Client: This example illustrates how to configure the device in SPI Client mode and how to receive data from an SPI host device, using the SPI interrupt (for more details, see Receiving Data as Client).
More details and code examples on the ATMEGA4809 can be found at the following links:
- TB3215-Getting Started with Serial Peripheral Interface (SPI)
- ATMEGA4809 Product Page
- ATMEGA4809 Code Examples on GitHub
- ATMEGA4809 Project Examples in START
- Microchip Studio 7.0.2542 or newer (https://www.microchip.com/mplab/microchip-studio)
- ATmega_DFP 1.6.364 or newer Device Pack
- ATMEGA4809 Xplained Pro (ATMEGA4809-XPRO)