|
This program grants the ability to output up to six frequencies at once using the resources of only a single cog. The program could be easily modified to support more outputs if necessary.
With a clock speed of 5MHz, single outputs can stably reach as high as 52KHz. The use of higher clock speeds can increase the maximum output. If more than one output is used (the main purpose of this program), the maximum frequencies depend on the amount and combination of frequencies.
Changing the ratio variable allows programmers to alter the high to low ratio of the frequencies being outputted. The value is divided by 10 to determine the length of high/low wait. If a output is not needed, just enter -1 for the pin or 0 for the frequency.
|