English
Language : 

PIC16LF1526 Datasheet, PDF (185/354 Pages) Microchip Technology – 64-Pin Flash Microcontrollers with nanoWatt XLP Technology
20.1.4 CCP PRESCALER
There are four prescaler settings specified by the
CCPxM<3:0> bits of the CCPxCON register. Whenever
the CCP module is turned off, or the CCP module is not
in Capture mode, the prescaler counter is cleared. Any
Reset will clear the prescaler counter.
Switching from one capture prescaler to another does not
clear the prescaler and may generate a false interrupt. To
avoid this unexpected operation, turn the module off by
clearing the CCPxCON register before changing the
prescaler. Equation 20-1 demonstrates the code to
perform this function.
EXAMPLE 20-1: CHANGING BETWEEN
CAPTURE PRESCALERS
BANKSEL CCPxCON ;Set Bank bits to point
;to CCPxCON
CLRF CCPxCON ;Turn CCP module off
MOVLW NEW_CAPT_PS ;Load the W reg with
;the new prescaler
;move value and CCP ON
MOVWF CCPxCON ;Load CCPxCON with this
;value
20.1.5 CAPTURE DURING SLEEP
Capture mode depends upon the Timer1/3/5 module for
proper operation. There are two options for driving the
Timer1/3/5 module in Capture mode. It can be driven by
the instruction clock (FOSC/4), or by an external clock
source.
When Timer1/3/5 is clocked by FOSC/4, Timer1/3/5 will
not increment during Sleep. When the device wakes from
Sleep, Timer1/3/5 will continue from its previous state.
Capture mode will operate during Sleep when
Timer1/3/5 is clocked by an external clock source.
PIC16(L)F1526/27
20.1.6 ALTERNATE PIN LOCATIONS
This module incorporates I/O pins that can be moved to
other locations with the use of the alternate pin function
register, APFCON. To determine which pins can be
moved and what their default locations are upon a
Reset, see Section 12.1 “Alternate Pin Function” for
more information.
 2011 Microchip Technology Inc.
Preliminary
DS41458A-page 185