28.3.2.3 Synchronous Client 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 and RXxPPS registers. Both selections may 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 PIE3 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 Host clocks at the CKx pin.