Go to Post If my counts are correct, during the official matches 141,077 points were scored, and a minimum of 28,746 frisbees were successfully shot into goals. All without a single decapitation, severed limb, or even one porpoise becoming accidentally entangled in the nets. - dlavery [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Spotlight this post!  
Unread 16-01-2007, 15:02
Ultima Ultima is offline
Registered User
FRC #0369
 
Join Date: Oct 2005
Location: Brooklyn, NY
Posts: 26
Ultima will become famous soon enough
Re: Gear Tooth Sensor

Our code looks something like this for Encoder 1 and 2

void Encoder_1_Int_Handler(void)
{
// Encoder 1's phase a signal just transitioned from zero to one, causing
// this interrupt service routine to be called. We know that the encoder
// just rotated one count or "tick" so now check the logical state of the
// phase b signal to determine which way the the encoder shaft rotated.
if(ENCODER_1_PHASE_B_PIN == 0)
{
Encoder_1_Count += ENCODER_1_TICK_DELTA;
}
}

#endif

#ifdef ENABLE_ENCODER_2

Would this work or not?

P.S. If I take away the #ifdef ENABLE_ENCODER_3 from the correct intrrupt would that correctly disable ENCODERS 3 -6. If not was would be the correct way for doing this.

Last edited by Ultima : 16-01-2007 at 15:34. Reason: Clarification
 


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
Gear Tooth Sensor nukem Programming 9 04-02-2006 20:21
Gear Tooth Sensor Talha Electrical 1 23-01-2006 21:29
Gear Tooth Sensor AMIRAM Electrical 2 22-01-2006 04:09
Gear Tooth Sensor Question (InsrtNameHere) Electrical 2 20-01-2006 02:19
Gear tooth sensor issues Nine9cracker Electrical 2 17-01-2006 02:37


All times are GMT -5. The time now is 20:48.

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