![]() |
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" :confused: ).
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? |
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... :D |
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 |
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? :confused:
|
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 |
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.
|
| All times are GMT -5. The time now is 00:35. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi