EasyManua.ls Logo

Microchip Technology dsPIC30F - Input Capture Operation in Power Saving States; I;O Pin Control

Microchip Technology dsPIC30F
738 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
dsPIC30F Family Reference Manual
DS70060C-page 13-10 © 2004 Microchip Technology Inc.
13.8 Input Capture Operation in Power Saving States
13.8.1 Input Capture Operation in Sleep Mode
When the device enters Sleep mode, the system clock is disabled. In Sleep mode, the input cap-
ture module can only function as an external interrupt source. This mode is enabled by setting
control bits ICM<2:0> = ‘111’. In this mode, a rising edge on the capture pin will generate device
wake-up from Sleep condition. If the respective module interrupt bit is enabled and the module
priority is of the required priority, an interrupt will be generated.
In the event the capture module has been configured for a mode other than ICM<2:0> = ‘111
and the dsPIC30F does enter the Sleep mode, no external pin stimulus, rising or falling, will
generate a wake-up condition from Sleep.
13.8.2 Input Capture Operation in Idle Mode
When the device enters Idle mode, the system clock sources remain functional and the CPU
stops executing code. The ICSIDL bit (ICxCON<13>) selects if the module will stop in Idle mode,
or continue to operate in Idle mode.
If ICSIDL = 0 (ICxCON<13>), the module will continue operation in Idle mode. Full functionality
of the input capture module is provided for, including the 4:1 and 16:1 capture prescale settings,
defined by control bits ICM<2:0> (ICxCON<2:0>). These modes require that the selected timer
is enabled during Idle mode as well.
If the Input Capture mode is configured for ICM<2:0> = ‘111’, the input capture pin will serve only
as an external interrupt pin. In this mode, a rising edge on the capture pin will generate device
wake-up from Idle mode. A capture time base does not have to be enabled. If the respective
module interrupt enable bit is set and the user assigned priority is greater than the current CPU
priority level, an interrupt will be generated.
If ICSIDL = 1 (ICxCON<13>), the module will stop in Idle mode. The module will perform the same
functions when stopped in Idle mode as for Sleep mode (see Section 13.8.1 “Input Capture
Operation in Sleep Mode”).
13.8.3 Device Wake-up on Sleep/Idle
An input capture event can generate a device wake-up or interrupt, if enabled, if the device is in
Idle or Sleep mode.
Independent of the timer being enabled, the input capture module will wake-up from Sleep or Idle
mode when a capture event occurs, if the following are true:
Input Capture mode bits, ICM<2:0> = 111’ (ICxCON<2:0>) and
The interrupt enable bit (ICxIE) is asserted.
This same wake-up feature will interrupt the CPU if:
The respective interrupt is enabled (ICxIE = 1) and is of the required priority.
This wake-up feature is quite useful for adding extra external pin interrupts. The following
conditions are true when the input capture module is used in this mode:
The capture prescaler counter is not utilized while in this mode.
The ICI<1:0>(ICxCON<6:5>) bits are not applicable.
13.9 I/O Pin Control
When the capture module is enabled, the user must ensure the I/O pin direction is configured for
an input by setting the associated TRIS bit. The pin direction is not set when the capture module
is enabled. Furthermore, all other peripherals multiplexed with the input pin must be disabled.

Table of Contents

Other manuals for Microchip Technology dsPIC30F