Go to Post I used to be a FIRST Robotics mentor...then I took a Frisbee to the knee. - Travis Hoffman [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-06-2005, 06:52
Gal Longin's Avatar
Gal Longin Gal Longin is offline
Gal L.
#1578 (IsraBot)
Team Role: Leadership
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Israel
Posts: 32
Gal Longin is an unknown quantity at this point
Send a message via ICQ to Gal Longin Send a message via AIM to Gal Longin Send a message via MSN to Gal Longin Send a message via Yahoo to Gal Longin
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?
__________________
"Only two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." -Albert Einstein.

2005 Israel regional Finalist
2005 Israel regional Johnson & Johnson Sportmanship Award
2005 Israel regional Website Award
  #2   Spotlight this post!  
Unread 14-06-2005, 07:05
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
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   Spotlight this post!  
Unread 14-06-2005, 09:01
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
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
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #4   Spotlight this post!  
Unread 04-02-2006, 13:55
Athena Athena is offline
Registered User
FRC #1676 (Pi-oneers)
Team Role: Programmer
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Montvale, NJ
Posts: 8
Athena is on a distinguished road
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   Spotlight this post!  
Unread 04-02-2006, 19:49
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
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?
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
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #6   Spotlight this post!  
Unread 04-02-2006, 20:10
Andrew Blair's Avatar
Andrew Blair Andrew Blair is offline
SAE Formula is FIRST with Gasoline.
FRC #0306 (CRT)
Team Role: Alumni
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Corry
Posts: 1,193
Andrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond repute
Send a message via AIM to Andrew Blair Send a message via Yahoo to Andrew Blair
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.
__________________
Reading makes a full man, conference a ready man, and writing an exact man.
-Sir Francis Bacon

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
-Albert Einstein
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 18:51.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi