Did a lot of homework and got incremental and HBridge controller working for my DC Geared motor control system.
Now I am finding reason to focus on the firmware, but am really confused if I can get the PIC16F877A/PIC18F4550 to output 2 PWM at SAME frequency (the freq at which the HBridge is driven) but at 2 different duty cycles (to control the RPM of the two motors)...
Is is possible to have two different duty cycles of the same freq from two different pins of a PIC.
I am obviously asking about hardware PWM as a software solution would tie up the PIC too much AFAIC...
Do get back.
Vimal
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sun Jan 14, 2007 12:40 pm
Quote:
If I can get the PIC16F877A/PIC18F4550 to output 2 PWM at SAME
frequency (the freq at which the HBridge is driven) but at 2 different
duty cycles (to control the RPM of the two motors)...
The standard PWM modules already do this. In fact, they have to
have the same frequency. They both run off the same Timer2.
The only thing that can be different between CCP1 and CCP2 is
the duty cycle. The following thread has a example program
(which you have already seen) that does exactly what you want to do.
http://www.ccsinfo.com/forum/viewtopic.php?t=17729
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum