I am not able figure out the c code for speed control of dc motor using pwm method by 8051 for temperature controlled fan. can u please tell me how to write a duty cycle of 25,50,75,100.:confused: