hasnain2512
Newbie level 4
hey every one i m new in programing area i tired to control speed of DC motor by external frequency i write a code to calculate the frequency then set duty cycle according to this external frequency
let suppose freq is 1M Divide this by 40,000 the answer is 25 means set the duty cycle if freq is 2m divide 2m by 40,000 ans=50 means set duty cycle to 50% and external frequency vary form 0 to 4m. compiler show no error but when i run this in proteus dc motor run at max speed even when i set the freq to 1m . plz help :-(
let suppose freq is 1M Divide this by 40,000 the answer is 25 means set the duty cycle if freq is 2m divide 2m by 40,000 ans=50 means set duty cycle to 50% and external frequency vary form 0 to 4m. compiler show no error but when i run this in proteus dc motor run at max speed even when i set the freq to 1m . plz help :-(