Require python code for clkout functions on gpio pin for 1MhZ or above on RPI pico #9269
Replies: 2 comments 10 replies
-
The easiest way to get that is using the PIO. The most basic example for PIO is a square wave generator. The maximum frequency you can achieve is Fcpu / 2, e.g. 62.5 MHz at the standard CPU frequency of 125 MHz. The code for creating 1 MHz at GPIO2 could look like:
The freq at the pin is half the frequency set for the PIO. So the second-to-last line sets Pin and frequency. |
Beta Was this translation helpful? Give feedback.
-
If you want to use the |
Beta Was this translation helpful? Give feedback.
-
Need to generate a continuous square wave using internal clock frequency on the GPIO pin(not the PWM) as clkout function on RPI pico, which is avalaible in rp2040 as per datasheet. What will be the Thonny code for the same as i have surfed the internet but did not get any such code or help. Please if any one can share code or any documents regarding this topic.
Beta Was this translation helpful? Give feedback.
All reactions