// September 7th, 2012
// SPI_Master
unsigned char i = 0;
unsigned char dout = 0;

void init(void)
{
     ADCON0 = 0;
     ADCON1 = 0x0f;
     TRISB.B1 = 0; // SCK
     TRISB.B2 = 0; // _SS
     TRISC.B7 = 0; // SDO
     SPI1_Init();
}

void main() {
      init();
      while(1)
      {
              for(i=48; i<58; i++)
              {
                  PORTB.B2 = 0;
                  Delay_ms(1);
                  SPI1_Write(i);
                  PORTB.B2 = 1;
                  Delay_ms(100);
              }
      }
}