first, Im starting to learn SPI using atmega8. Tried to simulate it in AVRstudio4. The SPDR doesnt seem to load the data written to it. Is it supported in this AVR version? If not, how will i know that the data is actually passed to the slave, say the DS1306 RTC chip?
In my SPI interrupt, i'll write data to the SPDR, should i also read data from the SPDR at the same time? say,
void SPI_int (void) { SPDR = datatransmit; //transmit this data arrvieddata = SPDR; //read data from slave }
thanks...