PIC Frequency

Status
Not open for further replies.

brent4669

New Member
Hi All

I have a question about a 12V Dc Motor project I am undertaking at school. I am using a PIC 16F84A and all I need to do is change the output frequency from the chip to 2kHz to the motor. I have looked in Microchip and searched the forum but I must be looking in the wrong places. Just need a little push in the right direction.

Thanks
 
Last edited:
The obselete 18F84 doesn't have hardware PWM - use the device that replaced it last century, the 16F628, which does.

Or just do the PWM in software.
 
Hi

Thanks for the quick reply, I have assembled the code for the PWM, I am using the 16f84a because our teacher wants us to learn how to program it ie pwm, serial to parallel etc. If I adjust the duty cycle will that help me with my problem ???
 
Hi

Thanks for the quick reply, I have assembled the code for the PWM, I am using the 16f84a because our teacher wants us to learn how to program it ie pwm, serial to parallel etc. If I adjust the duty cycle will that help me with my problem ???


Adjusting the duty cycle doesnt change the pwm frequency...

Microchip's app note on soft pwm...
https://www.electro-tech-online.com/custompdfs/2009/08/00654a.pdf

Imagine you have a pwm frequency of 2khz, and a duty cycle of 10% on and 90% off....10 % of the power is applied to the load....now increase the duty cycle to 90% on and 10 % off....90% power is now applied to the motor so it runs faster....the frequency has remained the same....
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…