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.
PWM cycles counting
-
- Posts: 3
- http://meble-kuchenne.info.pl
- Joined: Thu Jul 03, 2025 10:29 am
-
- Matrix Staff
- Posts: 1951
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 510 times
- Been thanked: 696 times
Re: PWM cycles counting
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel