PIC18F258 MICROCHIP [Microchip Technology], PIC18F258 Datasheet - Page 125

no-image

PIC18F258

Manufacturer Part Number
PIC18F258
Description
High Performance, 28/40-Pin Enhanced FLASH Microcontrollers with CAN
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F258-E/SO
Manufacturer:
MIC
Quantity:
20 000
Part Number:
PIC18F258-I/P
Manufacturer:
ST
Quantity:
320
Part Number:
PIC18F258-I/SO
Manufacturer:
MICROCHIP
Quantity:
2 000
Part Number:
PIC18F258-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F2580
Manufacturer:
MIC
Quantity:
20 000
Part Number:
PIC18F2580-E/ML
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC18F2580-E/SO
Manufacturer:
Microchi
Quantity:
2 952
Part Number:
PIC18F2580-E/SP
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC18F2580-I/SO
Manufacturer:
MICRO
Quantity:
10
Part Number:
PIC18F2580-I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F2580-I/SO
0
Part Number:
PIC18F2585-I/SO
Quantity:
2
15.2.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.
15.2.4
There are four prescaler settings, specified by bits
CCP1M3:CCP1M0. Whenever the CCP1 module is
turned off, or the CCP1 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 15-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 15-1:
 2002 Microchip Technology Inc.
SOFTWARE INTERRUPT
CCP1 PRESCALER
CCP1 pin
Note: I/O pins have diode protection to V
CAPTURE MODE OPERATION BLOCK DIAGRAM
Edge Detect
Qs
Prescaler
÷ 1, 4, 16
and
CCP1CON<3:0>
Set Flag bit CCP1IF
(PIR1<2>)
DD
and V
T3ECCP1
T3ECCP1
T3CCP1
T3CCP1
Preliminary
SS
.
15.2.5
The CAN capture event occurs when a message is
received in either of the receive buffers. The CAN mod-
ule provides a rising edge 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 mes-
sage receive signal from the CAN module then takes
the place of the events on RC2/CCP1.
EXAMPLE 15-1:
CLRF
MOVLW
MOVWF
CCP1CON, F
NEW_CAPT_PS
CCP1CON
CAN MESSAGE TIME-STAMP
TMR1
Enable
TMR3
Enable
CCPR1H
TMR3H
TMR1H
CHANGING BETWEEN
CAPTURE PRESCALERS
PIC18FXX8
; Turn CCP module off
; Load WREG with the
; new prescaler mode
; value and CCP ON
; Load CCP1CON with
; this value
CCPR1L
TMR1L
TMR3L
DS41159B-page 123

Related parts for PIC18F258