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:raspberrypipico [2021/03/11 19:06]
admin [Programmable I/O]
raspberrypipico:raspberrypipico [2021/03/12 13:10]
admin [Programmable I/O]
Line 106: Line 106:
 ---- ----
 ==== Programmable I/O ==== ==== Programmable I/O ====
 +[[raspberrypipico:pico_pio|Programmable I/O]]\\
 +
 +----
 +[[https://www.youtube.com/watch?v=yYnQYF_Xa8g|In-depth: Raspberry Pi Pico's PIO - programmable I/O!]] by stacksmashing\\
 The RP Pico has eight state machines (0-7) including these parameters:\\ The RP Pico has eight state machines (0-7) including these parameters:\\
 - state machine number\\ - state machine number\\
Line 141: Line 145:
  
 ==The Nine State Machine Instructions== ==The Nine State Machine Instructions==
-  * in – Shifts 1 word of 32 bits at a time into the ISR from another location+  * in – Shifts 1 word of 32 bits at a time into the ISR
   * out – Shifts 1 word of 32 bits from the OSR e.g. out(pins, 4)   * out – Shifts 1 word of 32 bits from the OSR e.g. out(pins, 4)
-  * push – Sends data to the RX (input) FIFO+  * push – Sends data to the RX (input)
   * pull() – gets data from the TX (output),e.g. sm1.put(1234)   * pull() – gets data from the TX (output),e.g. sm1.put(1234)
   * mov() – moves data x or y in register, e.g. mov(y, osr) osr=output shift register   * mov() – moves data x or y in register, e.g. mov(y, osr) osr=output shift register
-  * irq – Sets or clears interrupt flag+  * irq – Sets or clears interrupt flag e.g. irq(rel(0)) in python: sm.irq(myFunction)
   * set() [] – Writes data to destination, 0=off, 1=on, delays 0 to 31 circles   * set() [] – Writes data to destination, 0=off, 1=on, delays 0 to 31 circles
   * wait – Pauses until a defined action happens   * wait – Pauses until a defined action happens
Line 153: Line 157:
 - nop () [] - no operations, delays 0 to 31 circles\\ - nop () [] - no operations, delays 0 to 31 circles\\
 - wrap_target() and wrap () - resets program counter and starts over again\\ - wrap_target() and wrap () - resets program counter and starts over again\\
-- irq() - interrupt, e.g. irq(rel(0)) in python: sm.irq(myFunction) 
 - lable() - sts a lable label("end")\\ - lable() - sts a lable label("end")\\
 - jmp () - jumps conditions:\\ - jmp () - jumps conditions:\\