PIC18F25J11-I/PT MICROCHIP [Microchip Technology], PIC18F25J11-I/PT Datasheet - Page 244

no-image

PIC18F25J11-I/PT

Manufacturer Part Number
PIC18F25J11-I/PT
Description
28/44-Pin, Low-Power, High-Performance Microcontrollers with nanoWatt XLP Technology
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
PIC18F46J11 FAMILY
17.2.4
There are four prescaler settings in Capture mode; they
are specified as part of the operating mode selected by
the mode select bits (CCPxM<3:0>). Whenever the
ECCP module is turned off, or Capture mode is dis-
abled, the prescaler counter is cleared. This means
that any Reset will clear the prescaler counter.
Switching from one capture prescaler to another may
generate an interrupt. Also, the prescaler counter will
not be cleared; therefore, the first capture may be from
a non-zero prescaler. Example 17-1 provides the
FIGURE 17-1:
DS39932C-page 244
ECCP PRESCALER
ECCP1 pin
CAPTURE MODE OPERATION BLOCK DIAGRAM
CCP1CON<3:0>
Prescaler
÷ 1, 4, 16
Q1:Q4
4
Edge Detect
4
and
Set CCP1IF
T3CCP1
T3CCP1
recommended method for switching between capture
prescalers. This example also clears the prescaler
counter and will not generate the “false” interrupt.
EXAMPLE 17-1:
CLRF
MOVLW
MOVWF
CCP1CON
NEW_CAPT_PS ; Load WREG with the
CCP1CON
TMR3
Enable
TMR1
Enable
CCPR1H
TMR3H
TMR1H
CHANGING BETWEEN
CAPTURE PRESCALERS
; Turn CCP module off
; new prescaler mode
; value and CCP ON
; Load CCP1CON with
; this value
© 2009 Microchip Technology Inc.
CCPR1L
TMR1L
TMR3L

Related parts for PIC18F25J11-I/PT