I am trying to implement interrupt based SPI communication between two Atmel microcontrollers. The data has to be transmitted from slave to master.
In master i continuously sends 0xff to the slave and master expects data from slave on each transfer.
char SPI_MasterTransfer(char cData) { uint8_t a; PORTB &= ~(_BV(PB4)); // Slave select a = SPDR; SPDR = cData; while(!(SPSR & (1