Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   interrupt in default code (http://www.chiefdelphi.com/forums/showthread.php?t=38592)

Gal Longin 14-06-2005 06:52

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?

Ryan M. 14-06-2005 07:05

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

Mike Betts 14-06-2005 09:01

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

Athena 04-02-2006 13:55

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:

Mike Betts 04-02-2006 19:49

Re: interrupt in default code
 
Quote:

Originally Posted by Athena
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:

Athena,

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

Andrew Blair 04-02-2006 20:10

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