Цитата(Metallist64 @ Oct 15 2008, 10:56)

В даташите в режме slave при приеме байта ждут 1 во флаге SPIF. ОН ЧТО ПРИ ПРИЕМЕ УСТАНАВЛИВАЕТЯ В 0 ???.
Цитата из DS
Цитата
When a serial transfer is complete, the SPIF flag is set. An interrupt is generated if SPIE in SPCR is set and global interrupts are enabled. If SS is an input and is driven low when the SPI is in Master mode, this will also set the SPIF flag. SPIF is cleared by hardware when executing the corresponding interrupt handling vector. Alternatively, the SPIF bit is cleared by first reading the SPI Status Register with SPIF set, then accessing the SPI Data Register (SPDR).
По окончанию приёма (и передачи, раз они идут одновременно) этот бит будет поднят в 1. Сбросится в ноль аппаратно 1) при прерывании или 2) чтении SPSR, а затем SPDR.