We can Extract Microcontroller PIC16LF526 Heximal, please view the Microcontroller PIC16LF526 features for your reference:
When setting up a Synchronous Slave Transmission, follow these steps:
Enable the synchronous slave serial port by setting bits SYNC and SPEN and clearing bit CSRC.
Clear bits CREN and SREN.
If interrupts are desired, then set enable bit TXIE when extract heximal from microcontroller.
If 9-bit transmission is desired, then set bit TX9.
Enable the transmission by setting enable bit TXEN.
If 9-bit transmission is selected, the ninth bit should be loaded in bit TX9D.
Start transmission by loading data to the TXREG register.
If using interrupts, ensure that GIE and PEIE (bits 7 and 6) of the INTCON register are set.
The operation of the Synchronous Master and Slave modes is identical, except in the case of the Sleep mode. Bit SREN is a “don’t care” in Slave mode if extract code from microcontroller.
If receive is enabled by setting bit CREN prior to the SLEEP instruction, then a word may be received during Sleep. On completely receiving the word, the RSR register will transfer the data to the RCREG register and if enable bit RCIE bit is set, the interrupt generated will wake the chip from Sleep.
If the global interrupt is enabled, the program will branch to the interrupt vector (0004h).
When setting up a Synchronous Slave Reception, follow these steps:
Enable the synchronous master serial port by setting bits SYNC and SPEN and clearing bit CSRC.
If interrupts are desired, set enable bit RCIE. If 9-bit reception is desired, set bit RX9. To enable reception, set enable bit CREN. Flag bit RCIF will be set when reception is complete and an interrupt will be generated if enable bit RCIE was set before extract program from microcontroller.
Read the RCSTA register to get the ninth bit (if enabled) and determine if any error occurred during reception. Read the 8-bit received data by reading the RCREG register. If any error occurred, clear the error by clearing bit CREN. If using interrupts, ensure that GIE and PEIE (bits 7 and 6) of the INTCON register are set after extract microcontroller heximal.