PIC can generate 2 different PWM

Thread Starter

Chaabane

Joined Nov 30, 2009
37
Hello,
I'm looking for pic that can generate 2 different PWM signal
i found that people get confused when they read about ECCP ,and they think that this one can generate 2 PWM...the truth is this Enhanced CCP can generate the same PWM in 2 or more pins so you can drive half or full H-bridge.

i check out 16F familly but none of them can generate 2 pwm signal
so i geuss ,i should go to the 18FXXXX

can any one help me with this ?
 

rjenkins

Joined Nov 6, 2005
1,013
I think you may be confusing things?

The typical PIC with two PWM outputs can generate independent signals with each PWM.

The shared part may well be that the carrier frequency (or clock source) must be the same for both channels.
(The pulse frequency may be the same, but the mark-space ratio for each can be set seperately.)

The multi-channel Motor PWM modules can have two pins per PWM, to drive both uper & lower halves of a bridge 'leg'.

if you use this type as general purpose PWM then you only use one pin per PWM channel.
 

jpanhalt

Joined Jan 18, 2008
11,087
I had a situation where I wanted two different frequencies, say a few KHz for a motor and <100Hz for a hobby servo. I used the hardware PWM/CCP for the higher frequency and did the servo control PWM in software.

What is your application?

John
 

Thread Starter

Chaabane

Joined Nov 30, 2009
37
Download MAPS from microchip and you will be able to find the proper PIC.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1924&dDocName=en544123
thanks,it looks the download is off for the moment
I think you may be confusing things?

The typical PIC with two PWM outputs can generate independent signals with each PWM.

The shared part may well be that the carrier frequency (or clock source) must be the same for both channels.
(The pulse frequency may be the same, but the mark-space ratio for each can be set seperately.)

The multi-channel Motor PWM modules can have two pins per PWM, to drive both uper & lower halves of a bridge 'leg'.

if you use this type as general purpose PWM then you only use one pin per PWM channel.
yes indeed,i didn't explain it right..

I had a situation where I wanted two different frequencies, say a few KHz for a motor and <100Hz for a hobby servo. I used the hardware PWM/CCP for the higher frequency and did the servo control PWM in software.

What is your application?

John
i have to control 2 identical DC motor (speed control),and sometimes they have to run with different speed so the vehicle can turn left or right.
I can do both PWM with software, but it will be handy to use PWM features.
 
Top