We can Read Protected PIC16F887 Heximal, please view the Protected PIC16F887 features for your reference:
This mode would typically be used in RS-485 systems. To set up an Asynchronous Reception with Address Detect Enable:
- Initialize the SPBRGH, SPBRG register pair and the BRGH and BRG16 bits to achieve the desired baud rate (see Section 12.3 “EUSART Baud Rate Generator (BRG)”) when read protected pic heximal.
- Enable the serial port by setting the SPEN bit. The SYNC bit must be clear for asynchronous operation.
- If interrupts are desired, set the RCIE interrupt enable bit and set the GIE and PEIE bits of the INTCON register.
- Enable 9-bit reception by setting the RX9 bit.
- Enable address detection by setting the ADDEN bit.
Enable reception by setting the CREN bit if read protected pic heximal.
The RCIF interrupt flag bit will be set when a character with the ninth bit set is transferred from the receive shift register to the receive buffer. An interrupt will be generated if the RCIE interrupt enable bit was also set
Read the RCSTA register to get the error flags. The ninth data bit will always be set.
Get the received 8 Least Significant data bits from the receive buffer by reading the RCREG register. Software determines if this is the device’s address.
If an overrun occurred, clear the OERR flag by clearing the CREN receiver enable bit.
If the device has been addressed, clear the ADDEN bit to allow all received data into the receive buffer and generate interrupts.
The factory calibrates the internal oscillator block output (INTOSC). However, the INTOSC frequency may drift as VDD or temperature changes, and this directly affects the asynchronous baud rate. Two methods may be used to adjust the baud rate clock, but both require a reference clock source of some kind when read protected pic heximal.
The first (preferred) method uses the OSCTUNE register to adjust the INTOSC output. Adjusting the value in the OSCTUNE register allows for fine resolution changes to the system clock source.
The other method adjusts the value in the Baud Rate Generator. This can be done automatically with the Auto-Baud Detect feature (see Section 12.3.1 “Auto-Baud Detect”). There may not be fine enough resolution when adjusting the Baud Rate Generator to compensate for a gradual change in the peripheral clock frequency in order to Break IC.