View Single Post
  #2   Spotlight this post!  
Unread 11-02-2004, 23:36
JRHaddock JRHaddock is offline
Registered User
AKA: Joey Haddock
FRC #3025 (DARC)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Decatur, AL
Posts: 7
JRHaddock is an unknown quantity at this point
Re: Interrupts and rotation sensors

http://www.chiefdelphi.com/forums/pa...le&paperid=272

I have included a link to a white paper written by Daniel Katanski which is an excellent place to start learning about this capability.

You say you want to use interrupts to increment a rotation count, but then you describe an analog measurement. The interrupts are digital inputs, typically a pulse and the pic controller can be configured to generate an interrupt on rising edge, falling edge, and (for some inputs) both edges. One method to apply this to determine the displacement of the machine would be to use a encoder on one of the drive train shafts that would generate a specific number of pulses for each revolution of the shaft. The interrupt routine would accumulate the number of pulses from a starting point and this would be directly related to displacement of the machine.