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 CCS Technical Support

18F4431 how many PWM's ???

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



Joined: 17 Apr 2005
Posts: 39
Location: Germany Stuttgart

View user's profile Send private message

18F4431 how many PWM's ???
PostPosted: Tue Sep 06, 2005 8:35 pm     Reply with quote

Hello,

I was wondering, after looking through some posts...

How many independent PWM channels has the 18F4431 ?
Datasheet says 8.

How independent are these ?
All run the same frequency but different duty cycles.


Thanks Martin
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Wed Sep 07, 2005 7:21 am     Reply with quote

I looked into the 18F4431, and yes, they are all independent PWM channels, but I think they have a common period. You can get 8 independent channels, or 4 pairs of 'half bridge' PWMs, which means pwm0 and pwm1 are complements of each other, similiarly pwm2 and pwm3, pwm4 and pwm5, pwm6 and pwm7 (when one's high, the other one's low). In fact, perhaps there is also a CCP1, which may or may not be a truly independent channel from the other eight.

One thing i don't like about the 18F4431 is that it can only have 16K of ROM.

Did you know that the PIC18F8520 has FOUR independent PWMs (but with a common period)?
aaaaamartin



Joined: 17 Apr 2005
Posts: 39
Location: Germany Stuttgart

View user's profile Send private message

PostPosted: Thu Sep 08, 2005 7:03 pm     Reply with quote

In a message dated 9/8/2005 11:31:19 AM Central Daylight Time, m.wochinger@gmx.de writes:
Hi Mike,

may you please further explain your post:

http://www.ccsinfo.com/forum/viewtopic.php?t=24307

I have had a look, and datasheet says, it has 4 duty-cycle registers.

All I want to do is drive DC-Brushed Motors.
They only need one PWM Pin each.
Can I drive 8 Motors simultaniously ?
Where do you read, all 8 PWM pins can run differnet dutycycles.

Thanks for looking again

aaaaamartin

----------------------------------------------------------------------



Hi Martin,

My father (who also happens to be my partner) was planning on using the 18F4431 to get 6 independent PWMs. Now that you pointed this out, it looks like 8 PWMs can only be obtained as 4 complementary pairs (half bridge mode). And with only 4 duty cycle generators, looks like we're limited to 4 independent single PWMs.

I'm going to ask Microchip tech support if there is indeed any PIC with more than 4 independent PWMs.

(Why not use two PICs?)
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Fri Sep 09, 2005 12:34 pm     Reply with quote

Microchip Tech Support has clarified the question:

Quote:
Below is a response from Microchip Engineering Support Team for your submitted ticket #: 1-29668
A description of the problem and our proposed resolution is contained below.

Area: PICmicro Products
Product Group: PIC18FXX31
Product: PIC18F4431

Problem Description:
Does the PIC18F4431 have 8 independent PWMs sharing the same period? Or can I get a total of only 4 independent PWMs? If I don't use complementary half bridge mode for the odd and even pwm pins, then does that force the even pins to only be I/O pins then?

Anyways, if I wanted multiple PWMs more than 4, what PICmicro or DsPIC would I have to use?

Thanks,
Mike

Problem Resolution:
In the Independent mode, each duty cycle generator is connected to both PWM output pins in a given PWM output pair. The odd and the even PWM output pins are driven with a single PWM duty cycle generator. PWM1 and PWM0 are driven by the PWM channel which uses PDC0 register to set the duty cycle, PWM3 and PWM2 with PDC1, PWM5 and PWM4 with PDC2, PWM7 and PWM6 with PDC3

Sorry we do not have any device with more then 4 independent PWM.
Guest








PostPosted: Fri Sep 09, 2005 7:44 pm     Reply with quote

aaaaaamarin:

The odd and the even PWM output pins are driven with a single PWM duty cycle generator. PWM1 The odd and the even PWM output pins are driven with a single PWM duty cycle generator. PWM1
The odd and the even PWM output pins are driven with a single PWM duty cycle generator. PWM1

= 3 x !

hitchi h8s has 8.

Thanks Martin
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