PIC18C658 MICROCHIP [Microchip Technology], PIC18C658 Datasheet - Page 129

no-image

PIC18C658

Manufacturer Part Number
PIC18C658
Description
High-Performance Microcontrollers with CAN Module
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18C658-1/CL
Manufacturer:
Microchip
Quantity:
6
Part Number:
PIC18C658-1/L
Manufacturer:
Microchip
Quantity:
6
Part Number:
PIC18C658-E/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658-E/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658-ES
Manufacturer:
Microchip
Quantity:
131
Part Number:
PIC18C658-I/L
Manufacturer:
Microchip
Quantity:
385
Part Number:
PIC18C658-I/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658-I/L
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18C658-I/PT
Manufacturer:
Microchip
Quantity:
601
Part Number:
PIC18C658-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18C658T-E/L
Manufacturer:
Microchip Technology
Quantity:
10 000
14.3.3
When the Capture mode is changed, a false capture
interrupt may be generated. The user should keep bit
CCP1IE (PIE registers) clear to avoid false interrupts
and should clear the flag bit CCP1IF, following any
such change in operating mode.
14.3.4
There are four prescaler settings, specified by bits
CCP1M3:CCP1M0. Whenever the CCP module is
turned off, or the CCP 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. Also, the prescaler counter will
not be cleared; therefore, the first capture may be from
a non-zero prescaler. Example 14-1 shows the recom-
mended method for switching between capture pres-
calers. This example also clears the prescaler counter
and will not generate the “false” interrupt.
FIGURE 14-1: CAPTURE MODE OPERATION BLOCK DIAGRAM
 2000 Microchip Technology Inc.
RXB0IF or
RXB1IF
SOFTWARE INTERRUPT
CCP PRESCALER
Note:
CCP1 Pin
CCP1CON<3:0>
I/O pins have diode protection to V
CCP2 Pin
edge detect
edge detect
Q’s
Q’s
Prescaler
÷ 1, 4, 16
Prescaler
÷ 1, 4, 1 6
and
and
CCP1M3:CCP1M0
CCP2M3:CCP2M0
Advanced Information
DD
Set Flag bit CCP1IF
Set Flag bit CCP2IF
and V
SS
.
T3CCP2
T3CCP1
T3CCP1
T3CCP2
14.3.5
The CAN capture event occurs when a message is
received in either receive buffer. The CAN module pro-
vides a rising edge to the CCP module to cause a cap-
ture event. This feature is provided to time-stamp the
received CAN messages.
EXAMPLE 14-1: CHANGING BETWEEN
CLRF
MOVLW
MOVWF
T3CCP2
T3CCP2
CAN MESSAGE RECEIVED
CCP1CON, F
NEW_CAPT_PS ; Load WREG with the
CCP1CON
CAPTURE PRESCALERS
TMR1
Enable
TMR1
Enable
TMR3
Enable
TMR3
Enable
; Turn CCP module off
; new prescaler mode
; value and CCP ON
; Load CCP1CON with
; this value
PIC18CXX8
TMR3H
CCPR1H
TMR1H
TMR3H
CCPR2H
TMR1H
DS30475A-page 129
TMR3L
CCPR1L
TMR1L
TMR3L
CCPR2L
TMR1L

Related parts for PIC18C658