Hi all, I am driving stepper motor that requires H to L transition to do stepping. = I used pic 32 core timer and it works fine now my co worker wants me to change it to hardware PWM instead of usin= g timer. well sounds ok until when I started changing the frequency on PWM the result I got all unknown. = like frequency is too off or duty cycle is moved after changing the frequency. the duty cycle is half the period. b= asically the user is going to change the frequency on stepper motor from 20hz to 2khz and I noticed that hardware pwm is its l= imits. according to my co worker hardware pwm is flexible and based on my test it is not going to give 20hz to 2k output.= some frequencys are not even close. using time I am able to get accurate frequency but it is using interrupt an= d they worry about it. my question is how do you guys calculate hardware pwm to get accurate result that always i= s going to output 50% duty cycle and close frequency. I am using pic32mx =A080mhz any idea? thanks AA --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .