|
Re: Then its simple...
Posted by Jerry Eckert.
Engineer from Looking for a team in Raleigh, NC sponsored by .
Posted on 3/16/2000 9:31 AM MST
In Reply to: Then its simple... posted by Mike Gray on 3/16/2000 9:12 AM MST:
:
: Yup, you're right, the MAX function operates on the 16 bit number. So the problem is back to simple scaling.
: The slope is where Nate wants it, all his equation needs is an intercept. The biggest p1_yfilt can ever be is 256. Divide it by 2 and you have no motion (128 counts). its clamped at 128 too. Add 64, and the motor runs.
Correct.
In general, if you want to scale by a factor of n, divide the input by n then add (127-(127/n)) to adjust the intercept.
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
|