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

PWM Inquiry?

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



Joined: 29 Dec 2003
Posts: 81

View user's profile Send private message

PWM Inquiry?
PostPosted: Thu Feb 19, 2004 5:42 am     Reply with quote

Hi,

Is it possible to have a PWM using an interrupt? Can I use #int_ccp1 or other interrupt that will work with PWM?

I need your inputs about this.

Thank u.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 19, 2004 10:34 pm     Reply with quote

If I use my favorite tool, http://www.google.com
and search for: 16F84 pwm int char
I find this code:
http://web.media.mit.edu/~stefanm/yano/picc_cheeks.html
This would appear to be software PWM, that is done with
the int_rtcc interrupt. Exactly what you are asking for.

How did I know to use those search terms with Goggle ?

1. I picked 16F84, because it's a PIC that does not
have hardware PWM. And, it's a very common PIC.

2. Search for PWM because that's what we're looking for.

3. Search for int and char, because we're looking for C
source code.

It's just lucky that the first link found by Google just
happens to use CCS. But also, CCS is a very popular
low cost compiler, so it's likely that CCS code will be
available on the net.

Using the techniques described above, you can use
Google to find the source code that you need.
SteveS



Joined: 27 Oct 2003
Posts: 126

View user's profile Send private message

PostPosted: Fri Feb 20, 2004 7:23 am     Reply with quote

Good tip on using int and char to find C source. Using just 'C' doesn't always work so well.

It's the simple things that are hard....

- SteveS
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