Quote:
Originally Posted by billbo911
I'm not sure I am following what the question is. If you have a PWM value that is going to be only one of two states, 0 or 255, then just test for one state. For example:
Code:
if (pwm03 > 127)
{
accumulator ++;
}
else
{
accumulator --;
}
I chose 127 just for simplicity.
Just as easily, you could test for the actual value.
Code:
if (pwm03 == 255)
{
accumulator ++;
}
else
{
accumulator --;
}
|
I was attempting to understand what the PHASE B was, i now know, and was just expressing how i was going to do it with out it in my specialized case. That code you wrote is exactly what i had described, and what has been in our code for a while now.