Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
raspberrypipico:pico_pio [2021/03/13 21:35]
admin [nop()]
raspberrypipico:pico_pio [2021/06/07 18:05]
admin [Knowledge]
Line 51: Line 51:
 **frequency** the frequency of the state machine, should be between 1000 and 125000000\\ **frequency** the frequency of the state machine, should be between 1000 and 125000000\\
  
-**GPIO pin** depending on the first on all following pins will be mapped (up to 32)\\+**GPIO pin** depending on the first one, all following pins will be mapped (up to 32)\\
 INPUT: in_base (sets input pins) INPUT: in_base (sets input pins)
    sm = StateMachine(0, do_something, freq=1000, in_base=pin10)    sm = StateMachine(0, do_something, freq=1000, in_base=pin10)
Line 279: Line 279:
    set(pins, 1) [31] #drive first mapped pin high and delay 31 cycles    set(pins, 1) [31] #drive first mapped pin high and delay 31 cycles
 ====nop()==== ====nop()====
-The NOP instruction stands for no operations. One can create delays between 1 to 31 cycles.\\+The NOP instruction stands for no operations. In combination with the delay function one can create delays between 1 to 31 cycles.\\
    nop () [31]   #delay 31 cycles    nop () [31]   #delay 31 cycles
  
Line 325: Line 325:
  
 ---- ----
-===== Simple Audio Out===== 
  
-   GPIO03----4k--- 
-                  | 
-   GPIO04----2k---- 
-                  |------ Audio Out 
-   GPIO05----1k---- 
-                  | 
-   GPIO06----500--- 
  
----- 
-==== Resistor DAC ==== 
- 
- 
----- 
 ===== Knowledge ===== ===== Knowledge =====
 [[https://www.youtube.com/watch?v=yYnQYF_Xa8g|In-depth: Raspberry Pi Pico's PIO - programmable I/O!]] by stacksmashing\\ [[https://www.youtube.com/watch?v=yYnQYF_Xa8g|In-depth: Raspberry Pi Pico's PIO - programmable I/O!]] by stacksmashing\\
Line 348: Line 335:
  
 [[https://www.seeedstudio.com/blog/2021/01/25/programmable-io-with-raspberry-pi-pico/|Seeedstudio: Programmable I/O with Raspberry Pi Pico by Jonathan Tan]]\\ [[https://www.seeedstudio.com/blog/2021/01/25/programmable-io-with-raspberry-pi-pico/|Seeedstudio: Programmable I/O with Raspberry Pi Pico by Jonathan Tan]]\\
 +
 +----
 +==== License ====
 +
 +This manuals is made by **Wolfgang Spahn** 2021.\\
 +Except where otherwise noted, content on this wiki is licensed under the following license: [[http://creativecommons.org/licenses/by-nc-sa/4.0/"|Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]].\\
 +
 +<html>
 +<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a> 
 +</html>
  
 ---- ----