I'm trying to simulate an ATmega168P working as an SPI slave in AVR Simulator 2, but regardless of what values I write into SPDR, the simulated processor always reads back zero.
Is what I'm trying to do possible at all?
I'm trying to simulate an ATmega168P working as an SPI slave in AVR Simulator 2, but regardless of what values I write into SPDR, the simulated processor always reads back zero.
Is what I'm trying to do possible at all?
In simulation you can not see the data transaction between Master and Slave.
I assume you are performing on-chip debugging and not just a simulation.
I also assume that you are performing line by line (step-in) debugging mode where it is not possible to view the data transfered through protocol.
You better Run the code and place breakpoints at appropriate/suitable place which won't interfer in the main process. Then you can see the received data in the simulator window.