If I send a Byte over SPI into an ATMega, where does that byte go? Is it stored in a register? If so, is that register easily accessible? Can it be expanded to hold, say, 16 bytes instead of 1?
Let's say we're talking about a 328. There are a couple ways to do it for that chip, one is using the USART in SPI mode (which is describeed in section 20), or using the hardware SPI device (which is described in section 18).
Basically the master puts a byte into SPDR - the SPI Data Register. The chip shifts it out the MOSI line to the slave, who receives it in its SPDR. Whatever was in the slave's SPDR is shifted out the slave's MISO line to the master's SPDR.
It's only a one-byte register, so you'd have to setup an interrupt routine, or poll the status register, to put the next byte in to be set.
The data sheet says it better than I am, I've had a long day fighting with Buildroot and I'm beat.
Joe