Go to Post Paul Copioli - A guy who is 13 years older than me, but acts about 13 years younger. - Amanda Morrison [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-11-2011, 23:54
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,562
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Interrupts

Quote:
Originally Posted by WizenedEE View Post
Has anyone tried to use the interrupt functionality of the WPILib directly? Let me see if I have this straight:
  • There are six interrupts available on GPIOs 1-6 [source - page 59] However, if that's true, why can we attach a encoder anywhere?
  • To get a function called whenever the pin changes state, the function RegisterInterruptHandler must be called
  • No interrupts can happen while another is in progress.

Also, I was wondering about calling a Relay.Set() function in an interrupt - would that take too long? How would it be possible if the relay was a private member of the class?

Thanks!
The WPILib document you referenced is for the IFI system.
Reply With Quote
  #2   Spotlight this post!  
Unread 28-11-2011, 02:10
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Interrupts

Quote:
Originally Posted by Joe Ross View Post
The WPILib document you referenced is for the IFI system.
Oh okay, thanks. I was expecting something like that. Is there another document that shows how to use interrupts? I am starting to piece things together, but it would be helpful if someone who has done this would share their experiences.

Specific question:
I just looked at the tInterruptHandler typedef, and I'm wondering what interruptAssertedMask would pass.
Reply With Quote
  #3   Spotlight this post!  
Unread 29-11-2011, 17:18
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Interrupts

Have you looked at the InterruptibleSensorBase class yet? It is a base class for the DigitalInput class. You can choose to block until the interrupt or register a callback on interrupt (based on which version of RequestInterrupts() you call).

-Joe
Reply With Quote
Reply


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


All times are GMT -5. The time now is 17:45.

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