PIC code - working, timing - 500KHz SPI

timing is set for SPI speed of 500KHz