Go to Post Come on, Dave! We need more lyrics! (I'll bring you fresh KK doughnuts at VCU's regional! :D ) - Squirrelrock [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 17-11-2005, 18:41
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Arrow 3 Encoders

Hello,
I was wondering if anyone has a modified version of Kevin's encoder code with support for 3 (or more) quadrature encoders. If you do I'd be quite thankful . My Email address is "slinkydeath@sbcglobal.net" if you're willing to share your code. Thank you very much,
Stephen
  #2   Spotlight this post!  
Unread 17-11-2005, 18:59
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: 3 Encoders

As far I am informed we only have two (available) hardware interrupts to use for the encoders, which would seem to indicate that we can only use 2 encoders.

However I also said nobody would hang last year
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #3   Spotlight this post!  
Unread 17-11-2005, 19:06
Tristan Lall's Avatar
Tristan Lall Tristan Lall is offline
Registered User
FRC #0188 (Woburn Robotics)
 
Join Date: Aug 2001
Rookie Year: 1999
Location: Toronto, ON
Posts: 2,484
Tristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond repute
Re: 3 Encoders

Without knowing the details of the code or of the implementation, could you use an auxillary processor to take encoder information (from several sources), then pass it back to the RC processor as a package, using one (RC) interrupt?
  #4   Spotlight this post!  
Unread 17-11-2005, 19:11
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: 3 Encoders

I think I heard of someone actually designing something to do this. Wow if one device could somehow keep track of those values and send it to the RC, that would be pretty sweet.
If I remember right, I thought that digitals 3-6 support interrupting, it's just they're banned together somehow.
  #5   Spotlight this post!  
Unread 17-11-2005, 19:16
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: 3 Encoders

Quote:
Originally Posted by stephenthe1
Hello,
I was wondering if anyone has a modified version of Kevin's encoder code with support for 3 (or more) quadrature encoders. If you do I'd be quite thankful . My Email address is "slinkydeath@sbcglobal.net" if you're willing to share your code. Thank you very much,
Stephen
Stephen,

Last year we used 2 encoders plus a gear-tooth counter. All three devices were driven by interrupts. I've attached the encoder.c file showing the initialization, and interrupt service routines. I've also included user_routines_fast.c which shows the handler InterruptHandlerLow ().

In short, interrupts are available in digital inputs 1-6. The caveat is inputs 3-6 can only be enabled or disabled as an entire block. You either get all or none. This also means that we chose to modify Kevin's code further, and move the phase B encoder signals to inputs 7 and 8. Leaving them on 5 and 6 would have caused unnecessary interrupts (this was done in encoder.h).

-SlimBoJones...
Attached Files
File Type: c encoder.c (17.3 KB, 48 views)
File Type: c user_routines_fast.c (12.2 KB, 43 views)
File Type: h encoder.h (3.6 KB, 37 views)
  #6   Spotlight this post!  
Unread 17-11-2005, 19:21
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: 3 Encoders

Thank you very much! I'm going to get going and start working with this. thanks everyone for the help!
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
Testing and Cause of Failure for Encoders and Hall Effect sensors ChrisH Electrical 28 19-09-2005 01:07
encoders stephenthe1 Programming 61 09-02-2005 15:05
Mechanical Wheel Encoders? Jaine Perotti Electrical 15 04-12-2004 22:46
Who used wheel encoders CyberWolf_22 Technical Discussion 12 04-05-2003 15:37


All times are GMT -5. The time now is 13:54.

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