Subject:
|
Re:Motor speed table question
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Sun, 17 Mar 1996 20:39:27 GMT
|
Original-From:
|
Brian Peter Schmalz <CSC_SCHMALZB@lawrence#stopspam#.edu>
|
Viewed:
|
2194 times
|
| |
| |
> Can anyone explain why the values in the _speed_table were chosen.
> int _speed_table[]= {
> 0b00000000, /* speed 0 */
> 0b00010001,
> 0b01001001,
> 0b01010101,
> 0b01010111,
> 0b01110111,
> 0b01111111,
> 0b11111111 /* speed 7 */
> };
> Can they be change to a linear format? (i.e. 0,36,73,109,146 etc)
Sure, why not? The way the motor speed table works is that the number is bit
shifted out to the motor. Each bit gets the same ammount of time. So if you
don't want your motor to move, then you bit shift all zeros. If you want it to
run at a slow speed, then you shift out mostly zeros, except for 2 ones. You
design the numbers to equally space the 1s (as good as possible anyway).
*Brian Schmalz
/--------------------+---------------------\
| Brian Schmalz | Building autonomous |
| 723 E. John Street | LEGO robots at |
| Appleton, WI | Lawrence University |
| 54911 | (414)832-6655 |
+---------------------+----------------------+
| Brian.P.Schmalz@Lawrence.edu |
| http://ellen.acad.lawrence.edu/~schmalzb |
| ftp://143.44.104.32 |
\------------------------------------------/
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|