Go to Post If I had a dollar for every time I thought we'd get a legitimate hint....Well, I might have a few dollars... - Andrew Blair [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 06-03-2005, 22:19
Kashi Chan Kashi Chan is offline
Registered User
no team
 
Join Date: Mar 2005
Location: California
Posts: 17
Kashi Chan is an unknown quantity at this point
Interrupt question

searched saw the white papers on interrupts for dummies, yet i still dont quite understand how to implement them. so far i have downloaded the kevin frc code for interrupts and transfered my code into the program. our banner sensors are hooked up to rc_dig_in01 02 and 03. is that all i need to do or am i missing something?
  #2   Spotlight this post!  
Unread 07-03-2005, 07:03
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 question

Disclaimer: I've never actually gotten them working, so you might not want to trust me...

Two things which you have to do with Kevin's code to make it actually do something:
  • Put some implementation in the interrupt handler (in user_routines_fast.c). Actually, Kevin has been extremely helpful by having a function call for each interrupt in there already. Just go into interrupts.c and find the appropriate handler for the one you want. (Read the comments if it is unclear. He does and excellent job with those. )
  • Turn them on! This is actually two things, (1) make sure you call the interrupt initializers you want in user_initialization (in user_routines.c) and (2) actually enable the interrupt in the initializing function. Read the comments at the bottom of the initializing routine to see how.
__________________

  #3   Spotlight this post!  
Unread 07-03-2005, 08:28
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 question

Quote:
Originally Posted by Kashi Chan
searched saw the white papers on interrupts for dummies, yet i still dont quite understand how to implement them. so far i have downloaded the kevin frc code for interrupts and transfered my code into the program. our banner sensors are hooked up to rc_dig_in01 02 and 03. is that all i need to do or am i missing something?
Kashi,

Have you tried reading this? It gives side by side examples on how to implement something (in this case, a timer) both with and without interrupts.

Please give it a try and repost here if you are still confused.

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...
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
Problems Initializing Serial Driver... neilsonster Programming 0 13-02-2005 23:27
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Big Question concerning Interrupt Pins 3-6 mightywombat Programming 14 24-02-2004 22:18
Interrupt Handlers and Variable Scope kaszeta Programming 2 14-02-2004 18:30
Interrupts Questions mightywombat Programming 0 03-01-2004 14:50


All times are GMT -5. The time now is 04:38.

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