Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Your Problem is very special.
I would suggest You to take the debugger of Atmel's AVR Studio 4.
You should open the .cof file that would generated at compiling process of Code Vision AVR.
The set AVR Simulator, Your Controller and the actual Clock speed.
Now you can go through Your Programm step by step an take a look at all used variable values if they are right or wrong.
Also You can take a look into the memory.
Your periphery ist hard to simulate, but you can see what bytes are written into the SPI data register.