29.3.2.3 Synchronous Slave Transmission Setup
- Set the SYNC and SPEN bits and clear the CSRC bit.
- Select the transmit output pin by writing the appropriate values to the RxyPPS register and RXxPPS register. Both selections should enable the same pin.
- Select the clock input pin by writing the appropriate value to the CKxPPS register.
- Clear the ANSEL bit for the CKx pin (if applicable).
- Clear the CREN and SREN bits.
- If interrupts are desired, set the TXxIE bit of the PIEx register and the GIE and PEIE bits of the INTCON register.
- If 9-bit transmission is desired, set the TX9 bit.
- Enable transmission by setting the TXEN bit.
- If 9-bit transmission is selected, insert the Most Significant bit into the TX9D bit.
- Prepare for transmission by writing the Least Significant eight bits to the TXxREG register. The word will be transmitted in response to the Master clocks at the CKx pin.