PIC16C620 Microchip Technology, PIC16C620 Datasheet - Page 55

no-image

PIC16C620

Manufacturer Part Number
PIC16C620
Description
EPROM-Based 8-Bit CMOS Microcontroller
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16C620-04/SS
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C620-04I/P
Quantity:
8
Part Number:
PIC16C620/JW
Manufacturer:
MICROCH
Quantity:
20 000
Part Number:
PIC16C620A-04/P
Quantity:
19
Part Number:
PIC16C620A-04/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C620A-04/SO
Manufacturer:
MICROCHI
Quantity:
84
Part Number:
PIC16C620A-04/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C620A-041/P
Quantity:
358
Part Number:
PIC16C620A-04I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C620A-04I/SS
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC16C620A-40/P
Manufacturer:
Microchip Technology
Quantity:
135
9.5
The PIC16C62X has 4 sources of interrupt:
• External interrupt RB0/INT
• TMR0 overflow interrupt
• PortB change interrupts (pins RB7:RB4)
cleared) all interrupts. Individual interrupts can be
disabled through their corresponding enable bits in
INTCON register. GIE is cleared on reset.
The “return from interrupt” instruction,
interrupt routine as well as sets the GIE bit, which
re-enable RB0/INT interrupts.
The INT pin interrupt, the RB port change interrupt and
the TMR0 overflow interrupt flags are contained in the
INTCON register.
The peripheral interrupt flag is contained in the special
register PIR1. The corresponding interrupt enable bit is
contained in special registers PIE1.
When an interrupt is responded to, the GIE is cleared
to disable any further interrupt, the return address is
FIGURE 9-15: INTERRUPT LOGIC
• Comparator interrupt
The interrupt control register (INTCON) records
individual interrupt requests in flag bits. It also has
individual and global interrupt enable bits.
A global interrupt enable bit, GIE (INTCON<7>)
enables (if set) all un-masked interrupts or disables (if
pushed into the stack and the PC is loaded with 0004h.
Once in the interrupt service routine the source(s) of
1998 Microchip Technology Inc.
Interrupts
CMIE
CMIF
INTE
INTF
RBIF
RBIE
PEIE
T0IF
T0IE
GIE
RETFIE
, exits
Preliminary
the interrupt can be determined by polling the interrupt
flag bits. The interrupt flag bit(s) must be cleared in soft-
ware before re-enabling interrupts to avoid RB0/INT
recursive interrupts.
For external interrupt events, such as the INT pin or
PORTB change interrupt, the interrupt latency will be
three or four instruction cycles. The exact latency
depends when the interrupt event occurs (Figure 9-16).
The latency is the same for one or two cycle
instructions. Once in the interrupt service routine the
source(s) of the interrupt can be determined by polling
the interrupt flag bits. The interrupt flag bit(s) must be
cleared in software before re-enabling interrupts to
avoid multiple interrupt requests. Individual interrupt
flag bits are set regardless of the status of their
corresponding mask bit or the GIE bit.
Note 1: Individual interrupt flag bits are set
2:
regardless
corresponding mask bit or the GIE bit.
When an instruction that clears the GIE
bit is executed, any interrupts that were
pending for execution in the next cycle
are ignored. The CPU will execute a
NOP in the cycle immediately following
the instruction which clears the GIE bit.
The interrupts which were ignored are
still pending to be serviced when the GIE
bit is set again.
Wake-up
(If in SLEEP mode)
of
PIC16C62X
Interrupt
to CPU
the
status
DS30235G-page 55
of
their

Related parts for PIC16C620