SW006010 Microchip Technology, SW006010 Datasheet - Page 101

no-image

SW006010

Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
Datasheets

Specifications of SW006010

Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC17C
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
MPLAB®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
 2002 Microchip Technology Inc.
Modifying Register Bits
This interrupt is edge triggered. You can specify whether this interrupt occurs on every
rising or falling edge, every fourth rising edge, or every sixteenth rising edge. To select
the edge, you must set the Capture3 Mode Select (CA3ED1:CA3ED0) bits –
[TCON3<2>:TCON1<1>]. The following table outlines the values of these bits and the
edge that is selected:
To set edge selection to every rising edge, perform the following:
To set edge selection to every fourth rising edge, perform the following:
To enable the Capture3 interrupt, you must clear the following bit flags:
• The Peripheral Interrupt Request Register2’s (PIR2’s) Capture3 Interrupt Flag
• The Capture3 Overflow Status (CA3OVF) bit – [TCON3<5>].
• The INTSTA register’s Peripheral Interrupt Flag (PEIF) bit – [INTSTA<7>]. This
11.3.2.11 CAPTURE4 INTERRUPT
There are two ways to enable the Capture4 Interrupt:
TCON3 = TCON3 & 0b11111001;
TCON3 = TCON3 | 0b00000010;
TCON3 = TCON3 & 0b11111001;
TCON3 = TCON3 | 0b00000100;
(CA3IF) bit – [PIR2<2>].
clears any previous occurrences of Capture3 interrupts. In addition, you must set
the following enable bits:
- The Peripheral Interrupt Enable Register2’s (PIE2’s) Capture3 Interrupt
- The INTSTA register’s Peripheral Interrupt Enable (PEIE) bit – [INTSTA<3>].
Note: PIC17C7XX devices only.
Enable (CA3IE) bit – [PIE2<2>].
TCON3bits.CA3OVF = 0;
PIR2bits.CA3IF = 0;
PIE2bits.CA3IE = 1;
INTSTAbits.PEIF = 0;
INTSTAbits.PEIE = 1;
CA3ED1:CA3ED0
00
01
10
11
Enabling/Disabling Interrupts
// Reset Edge Selection
// Reset Edge Selection
Every falling edge
Every rising edge
Every fourth rising edge
Every sixteenth rising edge
Edge Selection
apRNOVM^-page 95
Part
Part
Part
Part
1
2
3
4

Related parts for SW006010