Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A fast and simple PWM question

Status
Not open for further replies.

qtommer

Member
I need to invoke the powers of the PWM in the PIC16F877A but after reading the datasheet discovered that it cannot handle a PWM period of 20ms. (50Hz)

My motors (from a previous project) need 50 Hz and hence I would like to inquire if there are any interfacing/any possible methods where my PIC will be able to control a servo with the aforementioned PWM requirement?

Motors are damn expensive in my part of the world=(
 
Is this an AC motor? PMW is normally used with DC motors and the PWM frequency is typically in the kHz region.
 
im actually controlling a RC servo...and even in my area, RC servos cost much $$$$$$......
i found out some software control PWM on this site that recommended to break down the 20ms into 20 subsections of 1ms frames but i cant seem to get the algorithm as it is in all in C...and im using assembly...

im guessing that should i want a duty cycle of 10% (2ms) , i would invoke a PWM routine of 2 1ms frames at 100% duty cycle followed by a PWM routine of zero duty cycle 18times?

I hope it's not asking for too much but I would appreciate it if someone could give me a brief "breaking down into 20 sections" assembler code structure for the so I can get started to further progress the code for my application=)

even if there's no code...brief algorithm guidelines would be APPRECIATED ! thanks=)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top