I have understood the Pico W has 8 independent PWM generators called slices (from PWM0 to PWM7), and each slice has two channels (A and B), which makes a total of 16 PWM output (or input/output using the C/C++ SDK).
1) Looks like the output of these slices/channels (https://mischianti.org/wp-content/uploa ... hianti.png) are linked to the GPIO from 0 to 15 (from PWM0A to PWM7B), but what about the pin from GPIO16 to GPIO28 (except GPIO23, 24, 25, 29 because used internally)? Are they a simple duplication or do they change something to the signal?
2) The C/C++ SDK API documentation (https://www.raspberrypi.com/documentati ... 222465dcff) said "...All 30 GPIOs can be driven by the PWM block...". What are these 30 GPIO? I count only 26 pin available. Do you have an alternative picture?
3) What's the meaning to have two channels for every slice? I know a PWM signal is defined by the frequency and the duty cycle, and when a frequency is set for a generator (i.e. PWM0) every channel linked to it (PWM0A and PWM0B) use the same frequency, but what the duty cycle? Can I set it independently for each channel or at the end the two outputs are exactly the same signal?
4) For the "duplicated" output (i.e. the GPIO0 and GPIO16 are linked at the same PWM0A), can I used them at the same time?
5) When I activate a PWM (i.e. GPIO0 with PWM0A) the twin pin (GPIO1 with PWM0B) is still usable for different use (i.e as an input pin) or it become unavailable?
6) On Micropython (but not on the C/C++ SDK) the PWM class constructor (https://docs.micropython.org/en/latest/ ... e.PWM.html) has a parameter called "invert" to invert the output (I suppose the duty cycle) but it states is not available at all ports. Do you know on what ports are not available?
7) Always on Micropython, the function deinit() disables the PWM output (but it doesn't accept any parameters, for example which pin). What does mean? Does it disable all generators on the board?
1) Looks like the output of these slices/channels (https://mischianti.org/wp-content/uploa ... hianti.png) are linked to the GPIO from 0 to 15 (from PWM0A to PWM7B), but what about the pin from GPIO16 to GPIO28 (except GPIO23, 24, 25, 29 because used internally)? Are they a simple duplication or do they change something to the signal?
2) The C/C++ SDK API documentation (https://www.raspberrypi.com/documentati ... 222465dcff) said "...All 30 GPIOs can be driven by the PWM block...". What are these 30 GPIO? I count only 26 pin available. Do you have an alternative picture?
3) What's the meaning to have two channels for every slice? I know a PWM signal is defined by the frequency and the duty cycle, and when a frequency is set for a generator (i.e. PWM0) every channel linked to it (PWM0A and PWM0B) use the same frequency, but what the duty cycle? Can I set it independently for each channel or at the end the two outputs are exactly the same signal?
4) For the "duplicated" output (i.e. the GPIO0 and GPIO16 are linked at the same PWM0A), can I used them at the same time?
5) When I activate a PWM (i.e. GPIO0 with PWM0A) the twin pin (GPIO1 with PWM0B) is still usable for different use (i.e as an input pin) or it become unavailable?
6) On Micropython (but not on the C/C++ SDK) the PWM class constructor (https://docs.micropython.org/en/latest/ ... e.PWM.html) has a parameter called "invert" to invert the output (I suppose the duty cycle) but it states is not available at all ports. Do you know on what ports are not available?
7) Always on Micropython, the function deinit() disables the PWM output (but it doesn't accept any parameters, for example which pin). What does mean? Does it disable all generators on the board?
Statistics: Posted by two_socks — Wed May 01, 2024 11:23 pm