View Single Post
  #1   Spotlight this post!  
Unread 15-02-2013, 21:53
JohnGilb JohnGilb is offline
Programming Mentor, Drive Mentor
FRC #0488
 
Join Date: Mar 2011
Rookie Year: 2003
Location: Redmond, WA
Posts: 116
JohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura aboutJohnGilb has a spectacular aura about
How to perform Digital averaging via the FPGA?

On our robot we're using a sensor to detect the presence of a disc. It's a pretty good sensor, but it will occasionally produce false positives and false negatives, as well as having a bit of a "bouncing" issue when a disc just starts to pass overhead. In each of these cases, the value is correct somewhere between 75%-98% of the time.

Due to some time-critical mechanisms, we can't afford to read this sensor multiple times in a software. We need to make one good read and take action.

Is there a way to have the FPGA do this averaging for us? Ideally, it'd read the signal thousands of times and tell me if there were more TRUE values or FALSE values since I last called it.