Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

PIC24F Family Reference Manual
DS39698A-page 10-2 Advance Information © 2006 Microchip Technology Inc.
10.1 INTRODUCTION
All PIC24F devices offer a number of built-in strategies for reducing power consumption. These
can be particularly useful in applications which are both power-constrained (such as battery
operation), yet require periods of full-power operation for timing-sensitive routines (such as serial
communications). This section discusses the four power-saving features implemented in
hardware:
Microcontroller Clock Manipulation
Instruction-Based Power-Saving Modes (Sleep and Idle)
Hardware-Based Doze Mode
Selective Peripheral Control
10.2 MICROCONTROLLER CLOCK MANIPULATION
In general, reducing the microcontroller clock speed for any application will result in a power
saving that is roughly proportional to the clock frequency reduction. PIC24F devices allow for a
wide range of clock frequencies to be selected under application control. If the system clock
configuration is not locked, users can switch between low-power operation from an internal RC
oscillator, or high-speed and high-precision operation from a crystal oscillator, by simply chang-
ing the NOSC Configuration bits. In fact, users can choose between up to four different oscillators
at any time, allowing a maximum amount of flexibility in configuring application speed, frequency
precision and power consumption.
The process of changing the system clock during operation, as well as restrictions on clock
changes, are discussed in more detail in Section 6. “Oscillator”.
10.3 INSTRUCTION-BASED POWER-SAVING MODES
PIC24F devices have two special Power-Saving modes that can be entered through the execu-
tion of a special PWRSAV instruction:
Sleep Mode: The CPU, system clock source and any peripherals that operate on the
system clock source are disabled. This is the lowest power mode for the device.
Idle Mode: The CPU is disabled, but the system clock source continues to operate.
Peripherals continue to operate, but can optionally be disabled.
The assembly syntax of the PWRSAV instruction is shown in Example 10-1.
Example 10-1: PWRSAV Assembly Syntax
The Power-Saving modes can be exited as a result of an enabled interrupt, WDT time-out or a
device Reset. When the device exits one of these two operating modes, it is said to ‘wake-up’.
The characteristics of the Power-Saving modes are described in subsequent sections.
Note: SLEEP_MODE and IDLE_MODE are constants defined in the assembler include file
for the selected device.
PWRSAV #SLEEP_MODE ; Put the device into Sleep mode
PWRSAV #IDLE_MODE ; Put the device into Idle mode

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh