Hi,
I am working with a hardware designer for a basic PIC design, 16F886 and 18F2620.
I called out the 2 HW PIC pins for 3 position header, standard toy servo connector. The designer said he was not sure if PIC HW PWM pins would run slow enough to be able to control the toy servos.
First question - is CCP1 and CCP2 the HW PWM pins? I want to make sure.
Second question - will PWM component macro allow me to run at 50Hz, PIC will have 20MHz resonator if it makes a difference.
ON time pulse will be between 1ms & 2ms with balance of 20ms off.
Thanks
Ron
PWM Component Macro
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: PWM Component Macro
Yes, the CCPx pins are the PWM outputs.
And yes, the HW PWM output is much too fast to control a servo. You will need to create your own routine to do this. There are some examples of servo control on our website:
http://www.matrixmultimedia.com/Flowcode_Examples.php
And yes, the HW PWM output is much too fast to control a servo. You will need to create your own routine to do this. There are some examples of servo control on our website:
http://www.matrixmultimedia.com/Flowcode_Examples.php