|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
interrupt in default code
I'm sorry if such a topic already exists but i couldn't find anything about it(and i have read "Interrupts for Dummies"
).i was trying to understand the default code and i have a few questions about using interrupts. in the user_routines_fast.c there's a function called interrupt handler, but i can't seem to find what triggers it within the code. is there some section of the code that interrupts the regular processor activity and calls this function or does the processor do it itself. if so, is it the master processor or the user processor? |
|
#2
|
||||
|
||||
|
Re: interrupt in default code
The interrupt function is never directly called in the default code (and shouldn't really be in your code). In fact, it never even runs with the default code.
If you want to use the interrupt, you must enable it in user_intialization(). When the interrupt(s) you specify are triggered (such as a digital IO going high), the interrupt handler is run. Of course, I never got them to work, so... ![]() |
|
#3
|
||||
|
||||
|
Re: interrupt in default code
Gal,
I strongly suggest that you download http://kevin.org/frc/frc_interrupts.zip to get a fast understanding of interrupts. Mike |
|
#4
|
|||
|
|||
|
Re: interrupt in default code
Uhhh....the hyperlink isnt working. anyways. We are having problems with our interrupts as well. i just tried to enable them, and nothing happens. does somebody have any suggestions?
![]() |
|
#5
|
||||
|
||||
|
Re: interrupt in default code
Quote:
Kevin moved that file here to make room for the 2006 stuff. Although you can not compile and run directly on the 2006 RC (the uP changed) the basics have not changed and certainly you can cut and paste into your 2006 code. After looking it over, please post any specific questions and I will try and answer them. Mike |
|
#6
|
|||||
|
|||||
|
Re: interrupt in default code
Kevin's code really is wonderful. Its really well commented. In fact, I'm using it right now to write our code. I can't recommend it enough.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Out of the Box Camera Code | russell | Programming | 9 | 21-10-2009 05:28 |
| Best Way To Insert Autonomous Code Into Default then load help.? :-)? | gemccnp | Programming | 2 | 05-02-2005 18:58 |
| default code vs. 2.4 | stephenthe1 | Programming | 2 | 05-02-2005 18:02 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |