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

Low Power frequency(pulse) scaler algorithm

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







Low Power frequency(pulse) scaler algorithm
PostPosted: Sat Aug 08, 2009 4:10 am     Reply with quote

Hi.
I am trying to design Low power(meaning running as little as possible)
frequency(pulse) scaler.

First, i designed the prototype using algorithm that uses counter over flow interrupt.
For example, if divider is 4, there should be interrupt every four pulse inputs. Thus, I would set counter to Max-n+1 so that it interrupts on overflow.
The real problem is when the divider is not an integer.

For example, if the divider is 5.34, I can no longer use above algorithm.

I tried calculating input frequency directly and converting that to output frequency. However, it was very hard to generate accurate ratio of output freqeucy.

Any solutions to this design problem? Hardware or Software.

I will appreciate any responses. Thanks
Guest








PostPosted: Sat Aug 08, 2009 8:17 am     Reply with quote

This is called a "fractional n divider" and is used extensively in frequency synthesis and direct digital synthesizer design.

Google: fractional n divider and you will see the various methods that can be used.

If you are running very slow on the inputs you might be able to pull something off in the PIC, but you will more probably need a PLD or frequency synthesizer solution with external chips.

HTH - Steve H.
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