Go to Post Half your robot could be broken, some drive chains snapped, a drive motor burned out, etc... and your WCD will still be trucking. - AdamHeard [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi