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

How to setup 3 single PWM outputs in PIC18F4220?

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



Joined: 28 Sep 2003
Posts: 9
Location: AR, USA

View user's profile Send private message Yahoo Messenger

How to setup 3 single PWM outputs in PIC18F4220?
PostPosted: Wed Feb 09, 2005 12:38 pm     Reply with quote

Hi,

I'm using PIC18F4220 and don't know how to setup 3 independent PWM outputs. The datasheet from MicroChip introduces the "enhanced PWM", but I really don't know how to set it up. Everytime I tried, I got only 2 PWM outputs at CCP1 and CCP2.

Does anyone know how to set it up?
Thanks in advance

Ken.
bluetooth



Joined: 08 Jan 2005
Posts: 74

View user's profile Send private message

PostPosted: Wed Feb 09, 2005 2:26 pm     Reply with quote

Ken:

Without looking in great detail, I think the 4420 has four PWM outputs, but they're intended to be used to drive various bridge configurations. Doesn't look like you can program three different, simultaneous duty cycles.

Look at the 4431 - it has what you want and will most likely drop in the same socket as the 4420 you're using now.

Good luck....
kkobraa



Joined: 28 Sep 2003
Posts: 9
Location: AR, USA

View user's profile Send private message Yahoo Messenger

PostPosted: Wed Feb 09, 2005 3:01 pm     Reply with quote

Thanks for your reply.

I looked at the datasheet of 4431. It also has only 2 PWMs.
What if I generate another PWM using TIMER2? Is it possible to do this? If so, can someone show me how?

Thanks again.

Ken.
bluetooth



Joined: 08 Jan 2005
Posts: 74

View user's profile Send private message

PostPosted: Wed Feb 09, 2005 4:29 pm     Reply with quote

Ken:

Look at the 4431 data sheet again....

Figure 17-1 shows FOUR discrete PWM generators in the Power Control Module.

This is what you want! Rolling Eyes
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