PCM18XK1 Microchip Technology, PCM18XK1 Datasheet - Page 172

MODULE PROC PIC18F8680,6680,8565

PCM18XK1

Manufacturer Part Number
PCM18XK1
Description
MODULE PROC PIC18F8680,6680,8565
Manufacturer
Microchip Technology
Datasheet

Specifications of PCM18XK1

Accessory Type
Processor Module
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
ICE2000
For Use With
ICE2000 - EMULATOR MPLAB-ICE 2000 POD
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PIC18F6585/8585/6680/8680
15.2.3
When the Capture mode is changed, a false capture
interrupt may be generated. The user should keep bit
CCPxIE (PIE registers) clear to avoid false interrupts
and should clear the flag bit, CCPxIF, following any
such change in operating mode.
15.2.4
There are four prescaler settings specified by bits
CCPxM3:CCPxM0. Whenever the CCPx module is
turned off, or the CCPx module is not in Capture mode,
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. The prescaler counter will not be
cleared; therefore, the first capture may be from a
non-zero
recommended method for switching between capture
prescalers. This example also clears the prescaler
counter and will not generate the “false” interrupt.
FIGURE 15-1:
DS30491C-page 170
CCP1 pin
CCP2 pin
SOFTWARE INTERRUPT
CCP PRESCALER
prescaler.
CAPTURE MODE OPERATION BLOCK DIAGRAM
Q’s
Edge Detect
Edge Detect
Q’s
Prescaler
Prescaler
Example 15-1
1, 4, 16
1, 4, 16
and
and
CCP1CON<3:0>
CCP2CON<3:0>
Set Flag bit CCP2IF
Set Flag bit CCP1IF
shows
T3CCP1
T3CCP2
T3CCP2
T3CCP1
the
T3CCP2
T3CCP2
15.2.5
The CAN capture event occurs when a message is
received in any of the receive buffers. When config-
ured, the CAN module provides the trigger to the CCP1
module to cause a capture event. This feature is
provided to time-stamp the received CAN messages.
This feature is enabled by setting the CANCAP bit of
the CAN I/O Control register (CIOCON<4>). The
message receive signal from the CAN module then
takes the place of the events on RC2/CCP1.
EXAMPLE 15-1:
CLRF
MOVLW
MOVWF
CCP1CON
NEW_CAPT_PS
CCP1CON
CAN MESSAGE TIME-STAMP
TMR1
Enable
TMR1
Enable
TMR3
Enable
TMR3
Enable
CCPR1H
CCPR2H
TMR1H
TMR1H
TMR3H
TMR3H
CHANGING BETWEEN
CAPTURE PRESCALERS
 2004 Microchip Technology Inc.
; Turn CCP module off
; Load WREG with the
; new prescaler mode
; value and CCP ON
; Load CCP1CON with
; this value
CCPR1L
CCPR2L
TMR3L
TMR1L
TMR3L
TMR1L

Related parts for PCM18XK1