English
Language : 

PIC18F67J11T-I Datasheet, PDF (47/466 Pages) Microchip Technology – 64/80-Pin, High-Performance, 1-Mbit Flash Microcontrollers
PIC18F87J11 FAMILY
4.0 POWER-MANAGED MODES
The PIC18F87J11 family of devices provides the ability
to manage power consumption by simply managing
clocking to the CPU and the peripherals. In general, a
lower clock frequency and a reduction in the number of
circuits being clocked, constitutes lower consumed
power. For the sake of managing power in an
application, there are three primary modes of operation:
• Run mode
• Idle mode
• Sleep mode
These modes define which portions of the device are
clocked and at what speed. The Run and Idle modes
may use any of the three available clock sources (pri-
mary, secondary or internal oscillator block); the Sleep
mode does not use a clock source.
The power-managed modes include several
power-saving features offered on previous devices.
One is the clock switching feature, offered in other
PIC18 devices, allowing the controller to use the
Timer1 oscillator in place of the primary oscillator. Also
included is the Sleep mode, offered by all PIC® MCU
devices, where all device clocks are stopped.
4.1 Selecting Power-Managed Modes
Selecting a power-managed mode requires two
decisions: if the CPU is to be clocked or not and which
clock source is to be used. The IDLEN bit
(OSCCON<7>) controls CPU clocking, while the
SCS<1:0> bits (OSCCON<1:0>) select the clock
source. The individual modes, bit settings, clock
sources and affected modules are summarized in
Table 4-1.
4.1.1 CLOCK SOURCES
The SCS<1:0> bits allow the selection of one of three
clock sources for power-managed modes. They are:
• The primary clock, as defined by the FOSC<2:0>
Configuration bits
• The secondary clock (Timer1 oscillator)
• The internal oscillator
4.1.2
ENTERING POWER-MANAGED
MODES
Switching from one power-managed mode to another
begins by loading the OSCCON register. The
SCS<1:0> bits select the clock source and determine
which Run or Idle mode is to be used. Changing these
bits causes an immediate switch to the new clock
source, assuming that it is running. The switch may
also be subject to clock transition delays. These are
discussed in Section 4.1.3 “Clock Transitions and
Status Indicators” and subsequent sections.
Entry to the power-managed Idle or Sleep modes is
triggered by the execution of a SLEEP instruction. The
actual mode that results depends on the status of the
IDLEN bit.
Depending on the current mode and the mode being
switched to, a change to a power-managed mode does
not always require setting all of these bits. Many
transitions may be done by changing the oscillator
select bits, or changing the IDLEN bit, prior to issuing a
SLEEP instruction. If the IDLEN bit is already
configured correctly, it may only be necessary to
perform a SLEEP instruction to switch to the desired
mode.
TABLE 4-1: POWER-MANAGED MODES
Mode
OSCCON<7,1:0>
IDLEN(1) SCS<1:0>
Module Clocking
CPU Peripherals
Available Clock and Oscillator Source
Sleep
0
N/A
Off
Off
None – All clocks are disabled
PRI_RUN
N/A
10
Clocked Clocked Primary – HS, EC, HSPLL, ECPLL, INTOSC oscillator;
this is the normal, full-power execution mode
SEC_RUN
N/A
01
Clocked Clocked Secondary – Timer1 oscillator
RC_RUN
N/A
11
Clocked Clocked Internal oscillator block(2)
PRI_IDLE
1
10
Off
Clocked Primary – HS, EC, HSPLL, ECPLL, INTOSC
SEC_IDLE
1
01
Off
Clocked Secondary – Timer1 oscillator
RC_IDLE
1
11
Off
Clocked Internal oscillator block(2)
Note 1: IDLEN reflects its value when the SLEEP instruction is executed.
2: Includes the INTRC and INTOSC postcaler (internal oscillator block).
 2007-2012 Microchip Technology Inc.
DS39778E-page 47