Microchip Technology dsPIC33F Family Manual de usuario Pagina 11

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 16
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 10
© 2009 Microchip Technology Inc. DS70198C-page 12-11
Section 12. Input Capture
Input Capture
12
12.6 INPUT CAPTURE OPERATION IN POWER-SAVING MODES
12.6.1 Input Capture Operation in Sleep Mode
The Input Capture module does not operate when the device is in Sleep mode. In Sleep mode,
the Input Capture (ICx) pin can only function as an external interrupt source for wake-up. The
Sleep mode is enabled by setting the Input Capture Mode bits (ICM<2:0> = 111). In this mode,
if the input capture interrupt is enabled, a rising edge on the capture pin generates capture
interrupt.
The capture interrupt wakes up the device from Sleep, and the following occurs:
If the assigned priority for the interrupt is less than, or equal, to the current CPU priority, the
device wakes up and continues code execution from the instruction following the PWRSAV
instruction that initiated Sleep mode.
If the assigned priority level for the interrupt source is greater than the current CPU priority,
the device wakes up and the CPU exception process begins. Code execution continues
from the first instruction of the capture ISR.
12.6.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 Input Capture Stop-in Idle (ICSIDL) bit selection in the Input Capture
Control (ICxCON<13>) register determines whether the module stops in Idle mode or continues
to operate in Idle mode.
If ICSIDL = 0 (ICxCON<13>), the module continues to operate in Idle mode providing full
functionality of the Input Capture module including the 4:1 and 16:1 prescaler capture settings.
The prescaler capture settings are 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 ICSIDL = 1 (ICxCON<13>), the module stops in Idle mode. The module performs the same
functions as Sleep mode, when stopped in Idle mode. Refer to 12.6.1 “Input Capture Operation
in Sleep Mode”.
12.7 I/O PIN CONTROL
When the Input Capture module is enabled, the user-assigned application must ensure that the
I/O pin direction is configured for an input by setting the associated TRIS bit. The pin direction is
not set when the Input Capture module is enabled. All other peripherals multiplexed with the input
pin must be disabled.
Vista de pagina 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16

Comentarios a estos manuales

Sin comentarios