Subject:
|
RE: encoders
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Sat, 14 Feb 1998 20:58:24 GMT
|
Original-From:
|
Will Bain <WILLBAIN@CS.UMTnospam.EDU>
|
Viewed:
|
1344 times
|
| |
| |
At 06:08 PM 2/14/98 +1100, Joe Martin wrote:
> Does this mean that if you have a very slow pulse the encoder
> routine may increment more than one time per pulse or is it
> triggered of only on a rising or falling edge?
In my experience, it doesn't matter how slow the pulse is. The count is
increased each time the analog port value crosses outside of the middle
range defined by the two threshold values as shown below (please note that
you'll need to view this with a non-proportional font, like Courier):
__ __
/ \ / \
high .../....\........../....\..........
/: \ /: \
: \ / : \ /
low ...:.......\..../..:.......\..../..
: :\__/ : :\__/
: : : :
time-->
count: + + + +
Of course, if you only want one count per period, you could just set one or
the other thresholds to an extreme value and the other to a mid-range value.
This allows you to count either rising or falling signals.
Good luck to you and your robot.
--Will
, ,
__@_/ \_@__ |/
| /__, o @_/
)\ ) ( \ (\/\\,
~~~~~~~~~ ' ` ~~~~~~~~~~~ ` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wendy Parson, If you can't say anything good about someone,
Will Bain, sit right here by me.
& Tatoosh --Alice Roosevelt Longworth
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|