Go to Post If you squeeze cost out hard enough, any component can become a failure point. - EricVanWyk [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 20-12-2003, 14:02
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
EDU Demo Code: Encoder Interfacing Using Interrupts

I'm writing a motor controller that I intend to release in the future, but because of the interest in interfacing encoders lately, I've put together a small example that shows the best way I know to interface a quadrature encoder to the EDU robot controller. With this code, I've been able to track an encoder generating a few thousand counts per second. The code can be found here: http://kevin.org/frc.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #2   Spotlight this post!  
Unread 20-12-2003, 14:57
GregTheGreat's Avatar
GregTheGreat GregTheGreat is offline
Registered User
no team
 
Join Date: Jan 2003
Rookie Year: 2002
Location: USA
Posts: 386
GregTheGreat has a spectacular aura aboutGregTheGreat has a spectacular aura aboutGregTheGreat has a spectacular aura about
Re: EDU Demo Code: Encoder Interfacing Using Interrupts

Quote:
Originally Posted by Kevin Watson
I'm writing a motor controller that I intend to release in the future, but because of the interest in interfacing encoders lately, I've put together a small example that shows the best way I know to interface a quadrature encoder to the EDU robot controller. With this code, I've been able to track an encoder generating a few thousand counts per second. The code can be found here: http://kevin.org/frc.

-Kevin

Very Kool.... This is definitely a great example of good programming.

Once again... Very Kool.

-Greg The Great
  #3   Spotlight this post!  
Unread 22-12-2003, 01:09
Caleb Fulton's Avatar
Caleb Fulton Caleb Fulton is offline
Z = Z^2 + C ......WHEEEE!
AKA: aXvXiA
#0461 (West Side Boiler Invasion)
Team Role: College Student
 
Join Date: Dec 2002
Location: West Lafayette, Indiana
Posts: 205
Caleb Fulton has a spectacular aura aboutCaleb Fulton has a spectacular aura aboutCaleb Fulton has a spectacular aura about
Send a message via AIM to Caleb Fulton
Re: EDU Demo Code: Encoder Interfacing Using Interrupts

Thanks!!

The more examples on how to use interrupts correctly and effectively, the better...
__________________
  #4   Spotlight this post!  
Unread 08-01-2004, 22:57
roknjohn roknjohn is offline
Registered User
#1051
Team Role: Engineer
 
Join Date: Jan 2003
Location: Marion
Posts: 31
roknjohn is an unknown quantity at this point
Re: EDU Demo Code: Encoder Interfacing Using Interrupts

Kevin,

Thank you for all of the great interrupt examples for the EDU controller. They have been extremely educational. I've been racking my brain all year to figure out a simple way to use an encoder that had a useful resolution. This looks like an elegant solution with the new hardware.

My question is this: How does this translate to the full-size controller? I didn't see any interrupt pins on it.

Would we have to use a timer?
  #5   Spotlight this post!  
Unread 08-01-2004, 23:14
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: EDU Demo Code: Encoder Interfacing Using Interrupts

Quote:
Originally Posted by roknjohn
Kevin,

Thank you for all of the great interrupt examples for the EDU controller. They have been extremely educational. I've been racking my brain all year to figure out a simple way to use an encoder that had a useful resolution. This looks like an elegant solution with the new hardware.
Thank you. I'm glad you're making use of the code.

Quote:
Originally Posted by roknjohn
My question is this: How does this translate to the full-size controller? I didn't see any interrupt pins on it.

Would we have to use a timer?
Yes, we'll have interrupts on the new FRC controller. The port b interrupts on the EDU-RC directly map to the first six digital inputs on the new controller (i.e., Interrupt 1 = digital I/O 1, interrupt 2 = digital I/O 2,... interrupt 6 = digital I/O 6).

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
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


All times are GMT -5. The time now is 06:27.

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