pic24 SPI bus cycle: 8 clocks or 16?
I've been using the SPI on 18F using MCC generated code so am familiar with your difficulty.

SPI is more like exchanging register values between master and slave; communication is always two ways. For every byte you send, you will also receive a byte.

Typical communication is like this:


Master selects the slave by driving its Slave Select input low. You must add this code yourself. MCC does not generate this! Just define one PIC IO pin as output connect that to the slave device and drive it with your own code.
Master sends a command byte to the slave serially through the MOSI pin (Master Out, Slave In), toggling SCK clock line for each of the 8 bits.
Slave recognizes the received command byte and stores the requested data into its output buffer ready to be shifted out.
Master sends another byte with just zeros. The slave ignores these zeros (but check your datasheet).
While the master is clocking out the zero byte in step 4, it is also receiving the data byte that the slave is sending via the MISO pin (Master In, Slave Out).
Raise SS (Slave Select) high to tell the Slave the transaction is complete.


For example, let's say your slave slave returns a 16-bit reply when sent a certain command byte. This means you would need to send 3 bytes: the command byte and two zero bytes. You would also get 3 bytes back.

The first byte you received would have been when you sent the command byte. This is generally ignored; the slave usually just sends back a zero byte since it did not get a command yet and doesn't know what the master wants. The second and third byte would be the 16-bit reply from the slave from the command it was sent.

This is a general description. Read your datasheet for specifics. But this is a very typical transaction that might help you understand how SPI works.