Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC24F32KA302-I/ML Datasheet(PDF) 113 Page - Microchip Technology

Part # PIC24F32KA302-I/ML
Description  20/28/44/48-Pin, General Purpose, 16-Bit Flash Microcontrollers with XLP Technology
PDF  364 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC24F32KA302-I/ML Datasheet(HTML) 113 Page - Microchip Technology

Back Button PIC24F32KA302-I/ML Datasheet HTML 109Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 110Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 111Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 112Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 113Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 114Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 115Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 116Page - Microchip Technology PIC24F32KA302-I/ML Datasheet HTML 117Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 113 / 364 page
background image
 2011-2013 Microchip Technology Inc.
DS39995D-page 113
PIC24FV32KA304 FAMILY
8.4
Interrupt Setup Procedures
8.4.1
INITIALIZATION
To configure an interrupt source:
1.
Set the NSTDIS control bit (INTCON1<15>) if
nested interrupts are not desired.
2.
Select the user-assigned priority level for the
interrupt source by writing the control bits in the
appropriate IPCx register. The priority level will
depend on the specific application and type of
interrupt source. If multiple priority levels are not
desired, the IPCx register control bits for all
enabled interrupt sources may be programmed
to the same non-zero value.
3.
Clear the interrupt flag status bit associated with
the peripheral in the associated IFSx register.
4.
Enable the interrupt source by setting the
interrupt enable control bit associated with the
source in the appropriate IECx register.
8.4.2
INTERRUPT SERVICE ROUTINE
The method that is used to declare an ISR (Interrupt
Service Routine) and initialize the IVT with the correct
vector address depends on the programming language
(i.e., C or assembly) and the language development
toolsuite that is used to develop the application. In
general, the user must clear the interrupt flag in the
appropriate IFSx register for the source of the interrupt
that the ISR handles. Otherwise, the ISR will be
re-entered immediately after exiting the routine. If the
ISR is coded in assembly language, it must be termi-
nated using a RETFIE instruction to unstack the saved
PC value, SRL value and old CPU priority level.
8.4.3
TRAP SERVICE ROUTINE (TSR)
A Trap Service Routine (TSR) is coded like an ISR,
except that the appropriate trap status flag in the
INTCON1 register must be cleared to avoid re-entry
into the TSR.
8.4.4
INTERRUPT DISABLE
All user interrupts can be disabled using the following
procedure:
1.
Push the current SR value onto the software
stack using the PUSH instruction.
2.
Force the CPU to Priority Level 7 by inclusive
ORing the value, OEh with SRL.
To enable user interrupts, the POP instruction may be
used to restore the previous SR value.
Only user interrupts with a priority level of 7 or less can
be disabled. Trap sources (Level 8-15) cannot be
disabled.
The DISI instruction provides a convenient way to
disable interrupts of Priority Levels 1-6 for a fixed
period. Level 7 interrupt sources are not disabled by
the DISI instruction.
Note:
At a device Reset, the IPCx registers are
initialized, such that all user interrupt
sources are assigned to Priority Level 4.



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