AVR® Insights - Episode 12 - How Does SPI interface work on AVR Microcontrollers | Videos
AVR® Insights - Episode 12 - How Does SPI interface work on AVR Microcontrollers
https://github.com/MicrochipTech/avr_insights
Do you want to connect a microcontroller to an SD card? Learn the basics of Serial Peripheral Interface (SPI) protocol on AVR devices in this introduction video. This will enable your AVR microcontroller to communicate with multiple other devices at the same time!
Use the SPI bus to communicate between a master device and one or multiple slave devices with AVR microcontrollers. SPI uses MISO and MOSI lines to communicate between devices, the SCK or clock line to maintain a consistent clock between devices, and a SS or Slave Select line to pick which peripheral device is communicating with the master device.
Documentation references
--------------------------------------------------------------
Atmel Tools Documentation:
https://mchp.us/2Vz6gEJ
AVR Libc reference manual:
https://mchp.us/2W4g9cI
ATmega324PB datasheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/40001908A.pdf#page=230
ATmega 324PB Xplained Pro User Guide:
http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42633-ATmega324PB-Xplained-Pro_User-Guide.pdf
App note AVR319:
http://ww1.microchip.com/downloads/en/AppNotes/Atmel-2582-Using-the-USI-Module-for-SPI-Communication-on-tinyAVR-and-megaAVR-Devices_ApplicationNote_AVR319.pdf