SPI Communication synchronization
The only problem I can find is the initialization of the SPI port on the Master, plus the use of ReceiveData. 

On the Master, you as setting B3 and B5 as outputs.  But according to this document for the ATmega16, SS = PB4, MOSI = PB5, MISO = PB6, and SCK = PB7 and your SS is PB3.  So you should have:

DDRB |= (1 &lt;&lt; DDB3) | (1 &lt;&lt; DDB5) | (1 &lt;&lt; DDB7);


And according to this document for the ATmega8, SS = PB2, MOSI = PB3, MISO = PB4, and SCK = PB5. You should have PB4 configured as an output for MISO, and you do.

I'm not sure what you're using PB0 for, if it is to synchronize the two processors its unneeded.

Your method of sending and receiving data in ReceiveData is correct and should be used for both the Master and Slave (from the previous transmission).

Remember every time you send a byte, you get a byte back from the other end.