View Single Post
  #6   Spotlight this post!  
Unread 01-02-2015, 13:32
orbobigge orbobigge is offline
Head Programmer/President
AKA: Matthew
FRC #3284 (laser)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2011
Location: Camdenton
Posts: 7
orbobigge is an unknown quantity at this point
Re: How to implement an encoder with one speed clock, and one direction signal.

Quote:
Originally Posted by Joe Ross View Post
I'm not familiar with trackball encoders, and couldn't find any description of one that uses a clock and direction outputs. Can you point to a datasheet?
No, we found this within an old keyboard, made by Cherry Switch. The trackball uses 2 encoders, one for the X, and one for the Y. With an oscilloscope we found two outputs on each encoder. The first output is a clock pulse based on the encoder wheel rotation. The second output is high for clockwise, and low for counterclockwise rotation.

We are trying to use the Counter::SetExternalDirection method. According to the source codes comments:

/**
* Set external direction mode on this counter.
* Counts are sourced on the Up counter input.
* The Down counter input represents the direction to count.
*/

When setting the counter for k1X, the Get() method returns a 0 or a 1. The GetDirection() method return true or false, according to the direction of rotation. We cannot get the Get() method to count more than 0 or 1. Any help appreciated.
Reply With Quote