PWM cycles counting

For general Flowcode discussion that does not belong in the other sections.
Post Reply
orij
Posts: 3
http://meble-kuchenne.info.pl
Joined: Thu Jul 03, 2025 10:29 am

PWM cycles counting

Post by orij »

hi
i created PWM cycle ( set duty cycle from 0 to 255 and back to 0 ) .( for led dimmig effact )
i want this efact to work for 5 times. ( 5 cycles )
any idea how to do this?
thanks.
Attachments
Main.PNG
Main.PNG (74.57 KiB) Viewed 1048 times

BenR
Matrix Staff
Posts: 1951
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 510 times
Been thanked: 696 times

Re: PWM cycles counting

Post by BenR »

Hello,

The PWM should be driven by a timer, just enable a timer interrupt for that timer before you enable the PWM and this should give you an interrupt at the end of every period. Hope this helps.

Post Reply