Secured Microcomputer Embedded Firmware PIC18F2580 Unlocking

The PRI_RUN mode is the normal, full power execution mode of the microcontroller. This is also the default mode upon a device Reset unless Two-Speed Start-up is enabled in the process of Secured Microcomputer Embedded Firmware PIC18F2580 Unlocking (see Section 19.3 “Two-Speed Start-up” for details). In this mode, the OSTS bit is set.

The IOFS bit may be set if the internal oscillator block is the primary clock sourceThe SEC_RUN mode is the compatible mode to the “clock switching” feature offered in other PIC18 devices. In this mode, the CPU and peripherals are clocked from the Timer1 oscillator.

This gives users the option of lower power consumption while still using a high accuracy clock source. SEC_RUN mode is entered by setting the SCS1:SCS0 bits to ‘01’. The device clock source is switched to the Timer1 oscillator through the process of Copy MCU Microchip PIC16C77 Program, the primary oscillator is shut down, the T1RUN bit (T1CON<6>) is set and the OSTS bit is cleared.

The Timer1 oscillator should already be running prior to entering SEC_RUN mode. If the T1OSCEN bit is not set when the SCS1:SCS0 bits are set to ‘01’, entry to SEC_RUN mode will not occur. If the Timer1 oscillator is enabled, but not yet running, device clocks will be delayed until the oscillator has started.

Secured Microcomputer Embedded Firmware PIC18F2580 Unlocking

In such situations, initial oscillator operation is far from stable and unpredictable operation may result. On transitions from SEC_RUN to PRI_RUN mode, the peripherals and CPU continue to be clocked from the Timer1 oscillator while the primary clock is started to Read Chip PIC16C76 Flash. When the primary clock becomes ready, a clock switch back to the primary clock occurs.
When the clock switch is complete, the T1RUN bit is cleared, the OSTS bit is set and the primary clock is providing the clock. The IDLEN and SCS bits are not affected by the wake-up; the Timer1 oscillator continues to run.