Let us learn how we can PIC microcontroller SPI Communication using the MPLABX IDE and XC8 compiler. This tutorial only talks about SPI in PIC16F877a using XC8 compiler, the process will be the same for other microcontrollers but slight changes might be required.