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 make PWM ten chanels with PIC16F877A

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








How to make PWM ten chanels with PIC16F877A
PostPosted: Sun Aug 13, 2006 2:44 am     Reply with quote

hi,
i need to know. How to make PWM ten chanels with PIC16F877A.
cuz PIC16F877A have two PWM chanels.

thk a for your help.
Ttelmah
Guest







PostPosted: Sun Aug 13, 2006 6:09 am     Reply with quote

It depends massively on how fast the PWM needs to be. For low speeds, you can generate 'software' PWM, for example, using something like a 50uSec interrupt, and having 'down counters' for the pulse duration for each channel. With this sort of approach, something like 50Hz, with an 8bit PWM, is comfortably achievable.
You can also multiplex the existing PWM output, provided the 'target', only wants a short adjustable 'on' pulse. So, you can generate (say), a single PWM channel, and use an interrupt to update the output period for each pulse, and select the 'target' to send it to.
However, if you need 0-100% PWM outputs,at high speed, then you are going to need to look at adding a lot more hardware. There are I2C PWM chips, or you could adjust a pulse width with I2C/SPI controlled digital potentiometers.
There is no way to get 10 high speed full adjustable PWM outputs directly from the 877.

Best Wishes
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