(MaxDuty - MinDuty) would be 250(2)-100= 150
this would make more sense if your pwm value is a byte
it now becomes
Code:MotorDuty = ADCInVAL */ 150(2) + 100
not knowing whats in the sub ChngMotorHPWM
snippets lead to speculation
(MaxDuty - MinDuty) would be 250(2)-100= 150
this would make more sense if your pwm value is a byte
it now becomes
Code:MotorDuty = ADCInVAL */ 150(2) + 100
not knowing whats in the sub ChngMotorHPWM
snippets lead to speculation
Bookmarks