| int main(void) {
 // initialize the device
 uint8_t temp0,temp1,temp2=0;
 SYSTEM_Initialize();
 _TRISF0 = 0;
 _LATF0 = 1;
 
 
 while (1)
 {
 SPI1_Exchange8bit(0x9F);
 temp0 = SPI1_Exchange8bit(0xFF);
 temp1 = SPI1_Exchange8bit(0xFF);
 temp2 = SPI1_Exchange8bit(0xFF);
 
 printf("%x, %x, %x,",temp0,temp1,temp2);
 DELAY_milliseconds(2000);
 }
 
 return 1;
 }
 |