Teensy 3.2 PWM

Status
Not open for further replies.

jdevx

New member
Hi all,

I am currently doing a project that requires 12 bits of resolution and 5 channels of it. I want to use the teensy 3.2 because of its size and price. Can the 3.2 handle 5 pins at 12 bits resolution pwm?
 
But...


What I don't see on this page, is, for instance, the 3.2 can do 16 bits resolution, with an "Ideal Frequency" at 96 MHz of 732.4218Hz. The default frequency of the PWM outputs is 488.28, no matter what the frequency of the processor clock. So does that mean that 16 bits will work at ANY frequency below the "Ideal"? If so, why is it labeled "Ideal" rather than "Maximum"? If not, and I can't use a frequency as high as 732.4218 Hz, does that mean I have to operator the processor at 72 MHz and set the master frequency to 549.3164 Hz? Or is there some way to calculate what frequencies will work with what resolutions given a specific processor clock?
 
What I don't see on this page, is, for instance, the 3.2 can do 16 bits resolution, with an "Ideal Frequency" at 96 MHz of 732.4218Hz. The default frequency of the PWM outputs is 488.28, no matter what the frequency of the processor clock. So does that mean that 16 bits will work at ANY frequency below the "Ideal"? If so, why is it labeled "Ideal" rather than "Maximum"? If not, and I can't use a frequency as high as 732.4218 Hz, does that mean I have to operator the processor at 72 MHz and set the master frequency to 549.3164 Hz? Or is there some way to calculate what frequencies will work with what resolutions given a specific processor clock?

It's been a year, with no response, so responding to this will hopefully put this to the top of the stack so someone might answer it, since again I am facing the same issue.

Perhaps I was not clear: On a Teensy 3.2 I want to have pin 23 run at 16bits. The default frequency of the PWM is 488.28Hz, but the "ideal" frequency at 96MHz is 732.4218 Hz. The text only gives an example of a freqency that is faster than the "ideal", what happens if the frequency is slower, as in the example of using "analogWriteResolution(16)" without using "analogWriteFrequency(23, 732.4218)"?

Obviously I will just do both, since that freqency is not a problem, but there are cases where it could be.
 
Status
Not open for further replies.
Back
Top