Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

MicroPython • Re: Possible hardware or MicroPython bug?

$
0
0
The 16 PWM channels (8 2-channel slices) appear on GPIO0 to GPIO15, in the order PWM0 A, PWM0 B, PWM1 A…
This repeats for GPIO16 to GPIO29.
GPIO16 is PWM0 A, GPIO17 is PWM0 B, so on up to PWM6 B on GPIO2

Code:

GPIO        0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15PWM Channel 0A 0B 1A 1B 2A 2B 3A 3B 4A 4B 5A 5B 6A 6B 7A 7BGPIO        16 17 18 19 20 21 22 23 24 25 26 27 28 29PWM Channel 0A 0B 1A 1B 2A 2B 3A 3B 4A 4B 5A 5B 6A 6B
GP9 & GP25 BOTH refer to the SAME slice 4B
Thank you very much for this information.

I am going to update my quick reference Pico pinout diagram to the one from adafruit. Even though it lists the PWM slices (which others I've found online don't), it fails to show which slices are assigned to GPIO23 - GPIO25, though it could be reasonably deduced from the revealed assignment pattern.

To be honest, even if I had the adafruit diagram on hand from the start, I don't think I would have grasped what the PWM labels were telling me, at least in terms of this notion of "slice sharing". I'm a software guy not a hardware guy, and this microcontroller stuff is all very new to me.

Statistics: Posted by zslane — Fri Sep 19, 2025 6:32 pm



Viewing all articles
Browse latest Browse all 8609

Trending Articles