We can Extract Code of Microchip Protected MCU dsPIC30F2011, please view the Microchip Protected MCU dsPIC30F2011 features for your reference:
A typical transmit sequence would go as follows:
- The user generates a Start condition by setting the Start Enable bit, SEN (SSPCON2<0>).
- SSPIF is set. The MSSP module will wait the required start time before any other operation takes place.
- The user loads the SSPBUF with the slave address to transmit.
- Address is shifted out the SDA pin until all 8 bits are transmitted.
- The MSSP module shifts in the ACK bit from the slave device and writes its value into the SSPCON2 register (SSPCON2<6>) when extract firmware from MCU.
- The MSSP module generates an interrupt at the end of the ninth clock cycle by setting the SSPIF bit.
- The user loads the SSPBUF with eight bits of data.
- Data is shifted out the SDA pin until all 8 bits are transmitted.
- The MSSP module shifts in the ACK bit from the slave device and writes its value into the SSPCON2 register (SSPCON2<6>).
- The MSSP module generates an interrupt at the end of the ninth clock cycle by setting the SSPIF bit.
- The user generates a Stop condition by setting the Stop Enable bit, PEN (SSPCON2<2>).
- Interrupt is generated once the Stop condition is complete if the heximal of chip can be extracted.
The reload value is placed in the lower 7 bits of the SSPADD register (Figure 17-17). When a write occurs to SSPBUF, the Baud Rate Generator will automatically begin counting. The BRG counts down to ‘0’ and stops until another reload has taken place. The BRG count is decremented twice per instruction cycle (TCY) on the Q2 and Q4 clocks.
In I2C Master mode, the BRG is reloaded automatically. Once the given operation is complete (i.e., transmission of the last data bit is followed by ACK), the internal clock will automatically stop counting and the SCL pin will remain in its last state to crack MCU. Table 17-3 demonstrates clock rates based on instruction cycles and the BRG value loaded into SSPADD.