Page 1 of 1

Pico PWM Frequency

Posted: Tue Jul 25, 2023 5:41 pm
by chipfryer27
Hi

I've been playing with a Pico when I get time, and there is an issue with the PWM.

If I set it for a frequency of 5KHz then I get an actual frequency of 20Hz

Flowcode PWM=5KHz.jpg
Flowcode PWM=5KHz.jpg (62.49 KiB) Viewed 2323 times
Analyser PWM=20Hz.jpg
Analyser PWM=20Hz.jpg (30.63 KiB) Viewed 2323 times

Experimenting, if I set the component for a freqency of ~1.288MHz the I can get 5KHz.


Flowcode PWM=1288659Hz.jpg
Flowcode PWM=1288659Hz.jpg (27.88 KiB) Viewed 2323 times
PWM=5KHz Analyser.jpg
PWM=5KHz Analyser.jpg (37.08 KiB) Viewed 2323 times


5KHz_PWM.fcfx
(8.79 KiB) Downloaded 288 times

Just thought I'd let you know.

Regards

Re: Pico PWM Frequency

Posted: Wed Jul 26, 2023 9:07 pm
by chipfryer27
Hi

It's as if whatever is entered is then shifted >>8

Regards

Re: Pico PWM Frequency

Posted: Thu Jul 27, 2023 4:07 pm
by medelec35
Hi Iain
Thank you for the report.
I believe I have fixed the frequency for the 10bit PWM.
If you want to use the 10bit, I have attached the modified cal file.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\PICO
save the attached CAL in the above location.
Note: As PWM is 16bit, don't use 8bit set duty as the range will be severely limited.

Re: Pico PWM Frequency

Posted: Thu Jul 27, 2023 7:05 pm
by chipfryer27
Hi Martin

Thanks, I'll try that tomorrow. I was using the 10-bit option.

Regards

Re: Pico PWM Frequency

Posted: Fri Jul 28, 2023 1:14 pm
by chipfryer27
Hi

Working fine now

FC_PWM.jpg
FC_PWM.jpg (18.3 KiB) Viewed 2266 times
PWM Output.jpg
PWM Output.jpg (32.51 KiB) Viewed 2266 times

Thanks.

Re: Pico PWM Frequency

Posted: Fri Jul 28, 2023 1:41 pm
by medelec35
Hi Iain.
That's great, thanks for the update
I will ask for the modified file to be pushed to the update system.