Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC16C641-04/TQ Datasheet(PDF) 66 Page - Microchip Technology

Part # PIC16C641-04/TQ
Description  8-Bit EPROM Microcontrollers with Analog Comparators
PDF  136 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16C641-04/TQ Datasheet(HTML) 66 Page - Microchip Technology

Back Button PIC16C641-04/TQ Datasheet HTML 62Page - Microchip Technology PIC16C641-04/TQ Datasheet HTML 63Page - Microchip Technology PIC16C641-04/TQ Datasheet HTML 64Page - Microchip Technology PIC16C641-04/TQ Datasheet HTML 65Page - Microchip Technology PIC16C641-04/TQ Datasheet HTML 66Page - Microchip Technology PIC16C641-04/TQ Datasheet HTML 67Page - Microchip Technology PIC16C641-04/TQ Datasheet HTML 68Page - Microchip Technology PIC16C641-04/TQ Datasheet HTML 69Page - Microchip Technology PIC16C641-04/TQ Datasheet HTML 70Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 66 / 136 page
background image
PIC16C64X & PIC16C66X
DS30559A-page 66
Preliminary
© 1996 Microchip Technology Inc.
9.5
Interrupts
The PIC16C641 and PIC16C642 have four sources of
interrupt, while the PIC16C661 and PIC16C662 have
five sources:
• External interrupt RB0/INT
• TMR0 overflow interrupt
• PORTB change interrupts (pins RB7:RB4)
• Comparator interrupt
• Parallel Slave Port interrupt (PIC16C661/662)
The interrupt control register, (INTCON), records
individual core interrupt requests in flag bits. It also has
various individual enable bits and the global interrupt
enable bit.
The global interrupt enable bit, GIE (INTCON<7>)
enables (if set) all un-masked interrupts or disables (if
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, RETFIE, exits
the interrupt routine as well as sets the GIE bit, which
allows any pending interrupt to execute.
Those interrupts associated with the “core” have their
flag and enable bits in the INTCON register. The core
interrupts are: RB0/INT pin interrupt, the RB port
change interrupt, and the TMR0 overflow interrupt. The
INTCON register also contains the Peripheral Interrupt
Enable bit, PEIE. Bit PEIE will enable/mask the periph-
eral interrupts (CM and PSP) from vectoring when bit
PEIE is set/cleared.
Flag bits PSPIF and CMIF are contained in special
function register PIR1. The corresponding interrupt
enable bits (PSPIE and CMIE) are contained in special
function register PIE1.
When an interrupt is responded to, the GIE is cleared
to disable any further interrupt, the return address is
pushed into the stack and the PC is loaded with 0004h.
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 recur-
sive interrupts.
For external interrupt events, such as the RB0/INT or
Port RB 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 regard-
less of the status of their corresponding
mask bit or the GIE bit.
Note 2: 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.
FIGURE 9-15: INTERRUPT LOGIC
RBIF
RBIE
T0IF
T0IE
INTF
INTE
GIE
CMIE
Wake-up
(If in SLEEP mode)
Interrupt
CMIF
to CPU
PSPIE(1)
PSPIF(1)
PEIE
Note 1: The Parallel Slave Port is implemented on the PIC16C661 and PIC16C662 only.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com