Society of Robots - Robot Forum
Software => Software => Topic started by: aruna1 on February 25, 2009, 06:24:12 AM
-
guys is it possible to generate pwm signal using non ccp pin (like E0) in PIC 16F877A?. I'm using both pwm pins(ccp1 & ccp2) to drive my robot and now i need to operate a servo. so if i use a loop to toggle a pin between high and low to generate a pwm signal will it damage my PIC? and will pwm signal generate by this method is precise?
thanks
-
so if i use a loop to toggle a pin between high and low to generate a pwm signal will it damage my PIC? and will pwm signal generate by this method is precise?
Nope it won't damage anything. And in fact its my preferred way to control servos. Its very precise.
-
Like admin said, it is the preferred way to drive servos. If you do the math from the PIC data sheet, you'll find that the pulse width accuracy at 50 Hz (the typical servo update frequency) is not very good using the CCP hardware.