[time-nuts] frequency generation algorithm.
Dan Kemppainen
dan at irtelemetrics.com
Tue Jun 28 15:54:50 UTC 2016
Hi,
Quick question to the group, maybe slightly of topic.
I'm looking for a quick and dirty algorithm or method to generate a
pulse train at arbitrary frequencies based on a fixed clock source.
This will be run as code in a timer ISR in a microcontroller, so some
calculations can be done. Ideally the division ratio could be changed,
say from 100% to 0% of the master frequency. Frequency resolution is not
highly critical, however it would be very nice to have a 'dithered'
answer for odd ratios. Ideally the pulses in the pulse train would be as
evenly space as possible.
Any ideas, search terms, code examples are all welcome!
Thanks!
Dan
More information about the Time-nuts_lists.febo.com
mailing list