Microchip Technology dsPIC33F Family Manual de usuario Pagina 4

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 16
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 3
dsPIC33F Family Reference Manual
DS70198C-page 12-4 © 2009 Microchip Technology Inc.
12.3 CAPTURE EVENT GENERATION
12.3.1 Timer Selection
Each dsPIC33F family device has one or more input capture channels. Each channel can select
between Timer2 and Timer3 for its time base. Selection of the timer resource is accomplished
through the Input Capture Timer Select (ICTMR) bit in the Input Capture Control (ICxCON<7>)
register. This timer can be set using the internal clock source (F
OSC/2), or an external clock
source applied at the TxCK pin.
12.3.2 Input Capture Event Modes
The Input Capture module captures the 16-bit value of the selected timer (Timer2 or Timer3),
when a capture event occurs. A capture event is defined as a write of a timer value into the
capture buffer.
The Input Capture modes are configured by setting the appropriate Input Capture Mode
(ICM<2:0>) bits in the Input Capture Control (ICxCON<2:0>) register. Table 12-1 lists the Input
Capture mode and capture events for the different bit settings. The user-assigned application
must disable the Input Capture module (i.e., ICM<2:0> = 000) before changing a Capture mode.
Figure 12-2 illustrates the capture events for various Capture modes.
Table 12-1: Input Capture Modes
ICM<2:0>
Value
Input Capture Mode Capture Event Generation
000 Module disabled
001 Edge Capture mode On both rising and falling edge of the capture input signal
010 Falling Edge mode On the falling edge of the capture input signal
011 Rising Edge mode On the rising edge of the capture input signal
100 Prescaler mode (divided by 4) On every 4th rising edge of the capture input signal
101 Prescaler mode (divided by 16) On every 16th rising edge of the capture input signal
110 Unused (module disabled)
111 Sleep/Idle Wake-up mode No capture event
Vista de pagina 3
1 2 3 4 5 6 7 8 9 ... 15 16

Comentarios a estos manuales

Sin comentarios