View Single Post
  #1   Spotlight this post!  
Unread 29-01-2005, 04:10
karch karch is offline
In Zip Tie Heaven
AKA: Brian Liu
FRC #1510 (Westview Robotics)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Portland
Posts: 16
karch is on a distinguished road
Send a message via AIM to karch
Unhappy Confused about Interrupts

why is it that in setting up priority levels for interrupts, the parent intcon number changes:
INTCON3bits.INT2IP = 0; // Pin 1
INTCON2bits.INT3IP = 0; // Pin 2
INTCON2bits.RBIP = 0; // Pins 3, 4, 5, 6

but in setting up edge select, pin 1 and pin 2 are both intcon2bits:
INTCON2bits.INTEDG2 = 1; // Pin 1
INTCON2bits.INTEDG3 = 1; // Pin 2

and then when setting interrupt flags, they both turn into 3s?
INTCON3bits.INT2IF = 0; // Pin 1
INTCON3bits.INT3IF = 0; // Pin 2
INTCONbits.RBIF = 0; // Pins 3, 4, 5, 6

(not to mention pins 3,4,5,6 going from 2 to no number)

i got this code from the interrupts_for_dummies pdf in the white pages, so i'm assuming that this is correct code.

is it all just arbitrary, or what? what am i missing here?

Last edited by karch : 29-01-2005 at 04:12.