CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

18F4550 ECCP help

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
aruna1



Joined: 14 Oct 2008
Posts: 103

View user's profile Send private message

18F4550 ECCP help
PostPosted: Thu Nov 18, 2010 9:01 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Nov 18, 2010 10:27 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Nov 18, 2010 11:28 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Nov 18, 2010 11:41 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Nov 18, 2010 11:47 pm     Reply with quote

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: 19195

View user's profile Send private message

PostPosted: Fri Nov 19, 2010 3:12 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Nov 20, 2010 9:10 pm     Reply with quote

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 Smile
Thank you Ttelmah
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group