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
Last revision Both sides next revision
raspberrypipico:pico_pio [2021/03/13 22:03]
admin [nop()]
raspberrypipico:pico_pio [2021/12/04 09:38]
admin [Knowledge]
Line 17: Line 17:
 The RP2040 contains two **programmable IO blocks** with four **state machines** each, to control  GPIOs and to transfer data.\\ The RP2040 contains two **programmable IO blocks** with four **state machines** each, to control  GPIOs and to transfer data.\\
 {{:raspberrypipico:rp2040_diagram_for_a_single_pio_block.jpg?400|}}\\ {{:raspberrypipico:rp2040_diagram_for_a_single_pio_block.jpg?400|}}\\
 +
 +//diagram taken from the [[https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf|RP2040 Datasheet]]//\\
 +
 Each PIO block has one **instruction memory** with 32 instructions. Four read ports allows all state machine simultaneously access.\\ Each PIO block has one **instruction memory** with 32 instructions. Four read ports allows all state machine simultaneously access.\\
 Each state machine has:\\ Each state machine has:\\
Line 30: Line 33:
  
  
-//diagrams taken from the [[https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf|RP2040 Datasheet]]//\\+//diagram taken from the [[https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf|RP2040 Datasheet]]//\\
  
 ---- ----
Line 51: Line 54:
 **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 334: Line 337:
 Stepper motor example on [[https://www.youtube.com/watch?v=UJ4JjeCLuaI| Youtube by Tinker Tech Trove]] and the code on [[https://github.com/tinkertechtrove/pico-pi-playing/tree/main/pio-steppers|Github]]\\ Stepper motor example on [[https://www.youtube.com/watch?v=UJ4JjeCLuaI| Youtube by Tinker Tech Trove]] and the code on [[https://github.com/tinkertechtrove/pico-pi-playing/tree/main/pio-steppers|Github]]\\
  
-[[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 _seeedstudio.com]]\\ 
 + 
 +![[https://medium.com/geekculture/serial-connection-between-raspberry-pi-and-raspberry-pico-d6c0ba97c7dc|Serial Connection between Raspberry Pi and Raspberry Pico bySebastian _medium.com]]\\ 
 + 
 +---- 
 +==== 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>
  
 ---- ----