Locked Microcontroller PIC18F8493 Program Reading refers to cracking mcu pic18f8493 flash memory protection, and then copy embedded firmware from microprocessor;
The master can initiate the data transfer at any time because it controls the SCK. The master determines when the slave (Processor 2, Figure 17-2) is to broadcast data by the software protocol. In Master mode, the data is transmitted/received as soon as the SSPBUF register is written to.
If the SPI is only going to receive, the SDO output could be disabled (programmed as an input). The SSPSR register will continue to shift in the signal present on the SDI pin at the programmed clock rate. As each byte is received, it will be loaded into the SSPBUF register as if a normal received byte (interrupts and status bits appropriately set) when read out the code from MCU.
This could be useful in receiver applications as a “Line Activity Monitor” mode.The clock polarity is selected by appropriately programming the CKP bit (SSPCON1<4>). This then, would give waveforms for SPI communication as shown in Figure 17-3, Figure 17-5 and Figure 17-6, where the MSB is transmitted first. In Master mode, the SPI clock rate (bit rate) is user programmable to be one of the following:
FOSC/4 (or TCY)
FOSC/16 (or 4 · TCY)
FOSC/64 (or 16 · TCY)
Timer2 output/2 if the firmware of chip can be read
This allows a maximum data rate (at 40 MHz) of 10.00 Mbps.
Figure 17-3 shows the waveforms for Master mode.
When the CKE bit is set, the SDO data is valid before there is a clock edge on SCK. The change of the input sample is shown based on the state of the SMP bit. The time when the SSPBUF is loaded with the received data is shown.In Slave mode, the data is transmitted and received as the external clock pulses appear on SCK when Break IC memory. When the last bit is latched, the SSPIF interrupt flag bit is set.
Before enabling the module in SPI Slave mode, the clock line must match the proper Idle state. The clock line can be observed by reading the SCK pin. The Idle state is determined by the CKP bit (SSPCON1<4>) before the IC’s code has been read.
While in Slave mode, the external clock is supplied by the external clock source on the SCK pin. This external clock must meet the minimum high and low times as specified in the electrical specifications. While in Sleep mode, the slave can transmit/receive data. When a byte is received, the device will wake-up from Sleep.