| Posted: 06:51am 06 Feb 2021 |
Copy link to clipboard |
 Print this post |
|
CMM2 Waveshare board version 5.06.00RC2
The following program works correctly when used with COUNT 4 (pin 24) but fails when using the FAST COUNT pin (18)
pwm 1,stop setpin 18,CIN ' the fast count pin print pin(18) pwm 1,1000,50 pause 10 print pin(18)
>RUN 8510 8520 ' the 85xx is immaterial, it just keeps increment every time the program is run ' that is, the counter is not being reset by a new SETPIN 18,CIN statement '- the count does not even clear after a power reset! >RUN 8530 8540
' changing to use COUNT 4 pin (24) pwm 1,stop setpin 24,CIN ' print pin(24) pwm 1,1000,50 pause 10 print pin(24)
>RUN 0 10
>RUN 0 10
' works as I would expect.
Firmware is 5.06.00RC2. Also tested on an E100 running 5.05.03 using COUNT on GPIO 34 and works fine there.
Doug.
Edit: Forgot to mention - using a link from PWM to COUNT input for the tests. Edited 2021-02-06 16:53 by panky ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |