ragav4456
Full Member level 4
- Joined
- Aug 1, 2012
- Messages
- 228
- Helped
- 19
- Reputation
- 38
- Reaction score
- 17
- Trophy points
- 1,308
- Activity points
- 2,568
Hi friends
I need to vary pwm duty cycle in 0 to 255(50khz). but 50khz resolution is 8.64 bits(0 to 398).
i need scale the value 0 to 398 into 0 to 255? How to scale the values?
input data 255=398/1.56 ;
correct or not? how to use float value?
____________________
Hitech C compiler
I need to vary pwm duty cycle in 0 to 255(50khz). but 50khz resolution is 8.64 bits(0 to 398).
i need scale the value 0 to 398 into 0 to 255? How to scale the values?
input data 255=398/1.56 ;
correct or not? how to use float value?
____________________
Hitech C compiler