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

Generating slow PWMs

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







Generating slow PWMs
PostPosted: Thu Mar 27, 2003 7:34 pm     Reply with quote

Programming a PIC16C773 with an 8MHz Xtal:

I can create frequencies using the built-in PWM from 100KHz to 500Hz with no problem. Problem comes when I need frequecies below this. I need to produce frequecies down to 1Hz. Specifically, I need 1, 10, 50 and 100Hz.

I could enable Timer2 to interrupt every 2ms, count interrupts and toggle the output pin manually. But this seems messy. Any ideas on a cleaner solution? Thanks!

Charlie
___________________________
This message was ported from CCS's old forum
Original Post ID: 13164
Kenny



Joined: 07 Sep 2003
Posts: 173
Location: Australia

View user's profile Send private message

Re: Generating slow PWMs
PostPosted: Thu Mar 27, 2003 8:52 pm     Reply with quote

:=Programming a PIC16C773 with an 8MHz Xtal:
:=
:=I can create frequencies using the built-in PWM from 100KHz to 500Hz with no problem. Problem comes when I need frequecies below this. I need to produce frequecies down to 1Hz. Specifically, I need 1, 10, 50 and 100Hz.
:=
:=I could enable Timer2 to interrupt every 2ms, count interrupts and toggle the output pin manually. But this seems messy. Any ideas on a cleaner solution? Thanks!
:=
:=Charlie

Mr. Hamlett covered it very well in a recent post:
<a href="http://www.pic-c.com/forum/general/posts/12884.html" TARGET="_blank">http://www.pic-c.com/forum/general/posts/12884.html</a>
Regards
Kenny
___________________________
This message was ported from CCS's old forum
Original Post ID: 13167
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