poojariravi:
I have found few solutions from the google but its not clear of how to calculate the duty cycle on a specific pin which supports PWM signal.
If the Arduino is generating the PWM signal (which I presume is why you are using a PWM pin) then the duty cycle is determined by the value used for analogWrite() with 0 representing 0% and 255 representing 100%
...R