Problems with 16Mhz SPI clock on PIC 18F25K22
LOOK AT THE SLRCONX REGISTER, WHERE X IS PORT A, B OR C. Default bits are set, which limits slew rate to 25nSec, too slow for 16MHz SCK! Reset the bits corresponding to the port and pins you are using for SPI clock and data and it will work great. I got bit the same way, found the solution on another forum.