SPI (Serial Peripheral Interface ) communication between 2 AVR mcus

SPI stands for Serial Peripheral Interface

SPI  is a communication protocol used to communicate between microcontrollers and other devices, like other microcontrollers, external EEPROMs, DACs, ADCs, etc. With this interface, you have one Master device which initiates and controls the communication, and one or more slaves who receive and transmit to the Master

Project description 

This project shows SPI communication between 2 atmega8 mcus in which 1 atmega8 is master and the other one is a slave.

Here two MCU will transfer the byte to each other via SPI and will show the received byte at the output port

Sequence
  1. master atmega8 will transfer 112=01110000 to the slave atmega8
  2. slave atmega8 will transfer   21=00010101 to the master atmega8
  3. so master atmega8's PORTD should show 21=00010101
  4. So slave atmega8's PORTD should show 112=01110000
  5. master and slave prepare the data to be sent in their respective shift registers & the master generates the required clock pulses on the SCK line. MSB goes first.


ckt & codes are here : https://drive.google.com/file/d/0B8PCKc-8AIcDMEdOa3NwZnhVeWM/edit?usp=sharing




0 comments:

Post a Comment

Categories

Pages

Firmware Engineer

My photo
Works on Firmware, Embedded Linux, Smart Metering, RTOS, IoT backend

Contact Form

Name

Email *

Message *

Copyrighted by Hassin. Powered by Blogger.