View Single Post
  #1   Spotlight this post!  
Unread 30-01-2013, 12:11
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: US Digital Encoders - How many CPR?

The FPGA can decode approximately 153k edges per second and can handle 8 single channel counters and 4 two channel encoders simultaneously (each at 153k). If you're using a quaderature encoder (with four edges per count, the max is approximately 38k). This is the same across all languages. Neither the FPGA or the code care how many counts the encoder is, as long as it doesn't exceed 153k/38k limit. If you're running a shooter that only runs in one direction, you only need to use a single channel of the encoder with a counter object.

There is good discussion in the following thread about how the FPGA's clock rate affects the noise in measuring periods at high speed. http://www.chiefdelphi.com/forums/sh...d.php?t=112193. I recommend playing with the spreadsheet that Ether posted in that thread. The averaging feature used in that spreadsheet isn't user-accessible in Java, without recompiling WPILib. It wouldn't be hard to add, however. Without using averaging, it is better to use a lower count encoder.

Last edited by Joe Ross : 30-01-2013 at 18:15.
Reply With Quote