First you shoud ensure weather you are going to implement hardware SPI stack or Sortware.I think you expect Software only!!!.Also you shoud know CLOCK polority,Clock phase..
To write a byte
fun(byte data)
{
CS = 0; //Chip Enable
loop 8 times,
{
SCLK = 1;
Delay(3);
SO = (data >> 7);
Delay(3);
SCLK = 0;
data <<= 1;
}
CS = 1; //Chip Disable
for SPI lot of referenceses available but no idea about your controller.any have go through PIC you may get general idea.(h**p://www.microchipc.com/sourcecode/#interface)
Your peripherial ENC28j20 accept only raising edge datas.So make sure that!
in avr it is possible to play with clock edges and timing. I suppose it is just a mean to support various devices which could act similar to spi . f.e. 74hc595. So what clock edge to use is dependednt on actual spi slave you are going to have connection with.