View Single Post
  #4   Spotlight this post!  
Unread 30-03-2004, 11:22
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,642
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Re: Offloading intterupts to a counter

You are right, if you do the scheme I discussed you end up losing resolution at the higher RPM's. This is typically not an issue when you are using the encoders for wheel position (it is rare that a robot needs to know to the 1/8 of an inch where it is when it is going 10 feet per second.), but for other applications, you can sometimes need constant resolution, even at high speeds (cranks shaft position for spark timing for example).


If you are in this case, additional circuitry is often a good solution.

I think that you can use the up/down timer scheme from our robot last year with 64 bit parallel in/serial out latch (made from 8 8-bit shift resisters). This would let you read all the counters at one time with only 1 "shift in" command. You can buy pretty fast shift registers that would allow you to scream the data into the user CPU on the RC.

This would only take 2 or (at most) 3 pins on your RC (depending on if you want your counters to be able to be zeroed or not -- you can get by without zeroing them with a little software)

I think using the RS-232 solution would be a significant bother and complexity that you do not have to go through. The interface would be a cinch with the shift register & up/down counter solution.

Joe J.

Last edited by Joe Johnson : 30-03-2004 at 11:26.