View Single Post
  #1   Spotlight this post!  
Unread 09-02-2008, 15:52
3dude_2231's Avatar
3dude_2231 3dude_2231 is offline
no one messes with a Thingy =|
AKA: Menscher,Ran Menscher =]
FRC #2231 (Onyxtronix)
Team Role: Leadership
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Shoham, Israel
Posts: 233
3dude_2231 is a jewel in the rough3dude_2231 is a jewel in the rough3dude_2231 is a jewel in the rough
Send a message via MSN to 3dude_2231
interrupt enable

Hi all

been thinking about interrupts,
I didn't really dig into Kevin's code,
but if I'm not mistaken, enabling the interrupts is done by a '#define',
and is done only once, to affect the entire code, I might be mistaken here, but..

I don't want the IR affecting my teleop period's maneuvers, so.
I wanna disable the interrupts altogether, and this can be done by putting this:
INTCONbits.GIE = 0;
at the beginning of teleop code,
and this:
INTCONbits.GIE = 1;
at the beginning op autonomous mode.

now, some questions:
1. am I right?,
does the GIE (general interrupts enable) bit apply to all of the interrupts?
I havn't dealt with ints for a while now..

2.is that even necessary?
are the interrupts enabled in teleop anyway?

thanks in advance,
Ran.
__________________
Redefining the word "Rookie". (for 2 years now..)


Israeli Off Season Games: WINNERS!
check out this cool project I'm into..