Forum, Pulled the following read/write examples from another post:void SPIPut(unsigned char v) { while(!SPI2STATbits.SPITBE); // wait for TX buffer to empty SPI2BUF=v; // write byte to TX buffer while(!SPI2STATbits.SPIRBF); // wait for RX buffer to fill i..
↧