View previous topic :: View next topic |
Author |
Message |
aruna1
Joined: 14 Oct 2008 Posts: 103
|
18F4550 ECCP help |
Posted: Thu Nov 18, 2010 9:01 pm |
|
|
Hi I read 18F4550 has a ECCP module so it has 4 pwm pins for ccp1 (C2,D5,D6,D7).
My question is can I use this 4 pins to generate 4 distinct pwm signals with different pulse widths (but with same frequency).
Its pretty hard to understand on the data sheet. From what I understand it can do that. But I want to be sure. So some good explanation is welcome.
Thank you
compiler version 4.084 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Nov 18, 2010 10:27 pm |
|
|
Quote: | I read 18F4550 has a ECCP module so it has 4 pwm pins for ccp1 (C2,D5,D6,D7).
My question is can I use this 4 pins to generate 4 distinct pwm signals with different pulse widths (but with same frequency). |
You can't do it with the 18F4550. It only has one PWM generator module
for those 4 pins.
To get 4 or more PWM channels, you need to use a PIC such as the
18F4431 series:
http://www.ccsinfo.com/forum/viewtopic.php?t=37206 |
|
|
aruna1
Joined: 14 Oct 2008 Posts: 103
|
|
Posted: Thu Nov 18, 2010 11:28 pm |
|
|
PCM programmer wrote: | Quote: | I read 18F4550 has a ECCP module so it has 4 pwm pins for ccp1 (C2,D5,D6,D7).
My question is can I use this 4 pins to generate 4 distinct pwm signals with different pulse widths (but with same frequency). |
You can't do it with the 18F4550. It only has one PWM generator module
for those 4 pins.
To get 4 or more PWM channels, you need to use a PIC such as the
18F4431 series:
http://www.ccsinfo.com/forum/viewtopic.php?t=37206 |
so what is the point of having P1A,P1B,P1C,P1D (C2,D5,D6,D7)?
here i have attached(google doc) halfbridge mode of CCP1 pin.
take a look. it seems it generates two distinct pwms
https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B9bkKc15uKquZWZhZGVmN2YtODEyYi00NGVlLWI0YzEtNTFmMzM5NWE5ZGQ3&hl=en |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Nov 18, 2010 11:41 pm |
|
|
Quote: | it seems it generates two distinct pwms
|
No, it doesn't. Half-Bridge mode generates two opposite phases of the
same signal, with an optional dead-band delay. That is not what you
requested in your original post. You said:
Quote: |
My question is can I use this 4 pins to generate 4 distinct pwm signals
with different pulse widths (but with same frequency). |
|
|
|
aruna1
Joined: 14 Oct 2008 Posts: 103
|
|
Posted: Thu Nov 18, 2010 11:47 pm |
|
|
PCM programmer wrote: | Quote: | it seems it generates two distinct pwms
|
No, it doesn't. Half-Bridge mode generates two opposite phases of the
same signal, with an optional dead-band delay. That is not what you
requested in your original post. You said:
Quote: |
My question is can I use this 4 pins to generate 4 distinct pwm signals
with different pulse widths (but with same frequency). |
|
oh i thought they are two distinct pwms?
so its just a fake lol
thank you pcm programmer |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Fri Nov 19, 2010 3:12 am |
|
|
Not really a 'fake', but I think it is poorly described in parts of the Microchip documentation. As PCM says, on the ECCP, you have one 'timing generator', with the ability to drive Half-bridge, or full bridge timing patterns onto four pins, from this one generator. Microchip have the 'habit', of saying 'X PWM pins', and not of saying how many actual timing generators are available. The 'power PWM' module conversely, allows multiple different pulse widths on it's different pins (designed for doing things like synthesising multiple AC phases). It'd be really 'nice' if Microchip would say something like 'X PWM timing generators (y with the ability to generate full-bridge/half bridge outputs on separate pins)'. Might just make it a fraction easier to find the one with extra generators when you want it!.....
Best Wishes |
|
|
aruna1
Joined: 14 Oct 2008 Posts: 103
|
|
Posted: Sat Nov 20, 2010 9:10 pm |
|
|
Ttelmah wrote: | Not really a 'fake', but I think it is poorly described in parts of the Microchip documentation. As PCM says, on the ECCP, you have one 'timing generator', with the ability to drive Half-bridge, or full bridge timing patterns onto four pins, from this one generator. Microchip have the 'habit', of saying 'X PWM pins', and not of saying how many actual timing generators are available. The 'power PWM' module conversely, allows multiple different pulse widths on it's different pins (designed for doing things like synthesising multiple AC phases). It'd be really 'nice' if Microchip would say something like 'X PWM timing generators (y with the ability to generate full-bridge/half bridge outputs on separate pins)'. Might just make it a fraction easier to find the one with extra generators when you want it!.....
Best Wishes |
oh I see
Thank you Ttelmah |
|
|
|