I'm trying to get my MKL26Z256VLL4 MCU to output a 100Hz PWM signal. The lowest I've been able to get it is 322Hz. Does anyone know if this Micro controller is capable of producing a PWM signal at such a low frequency? Any input would be much appreciated.
Hello Michael Tangy
Kerry Zhou has suggested correct method. But still you will face issue then share your code. i will update it as per your requirement.
Thanks & regards
Harsh
INDIA
Hi Michael Tangy,
Yes, you can get 100HZ PWM in the KL26.
You can use the external 8Mzh crystal as the TPM clock source.
Then in the TPM module, the prescaler divide by 128, and set the modulo counter as 624, now you can get the 100Khz, because modulo counter = 62.5K/100hz -1 =624.
I have help you creating a project, it based on KDS PE, I have attached it for your reference.
This project can generate 100hz in PTC2 pin, this is the test result.
Wish it helps you.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------