Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| 
                    raspberrypipico:pico_pio [2021/03/13 19:33] admin [wait(option)]  | 
                
                    raspberrypipico:pico_pio [2021/12/04 09:40] (current) admin [Knowledge]  | 
            ||
|---|---|---|---|
| Line 17: | Line 17: | ||
| The RP2040 contains two **programmable IO blocks** with four **state machines** each, to control  | The RP2040 contains two **programmable IO blocks** with four **state machines** each, to control  | ||
| {{: | {{: | ||
| + | |||
| + | //diagram taken from the [[https:// | ||
| + | |||
| 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  | + | //diagram  | 
| ---- | ---- | ||
| 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, |    sm = StateMachine(0, | ||
| Line 165: | Line 168: | ||
| - polarity (1 clears the interrupt flag, 0 won' | - polarity (1 clears the interrupt flag, 0 won' | ||
| - num (interrupt number, with rel the relative interrupt numbers could be used)\\   | - num (interrupt number, with rel the relative interrupt numbers could be used)\\   | ||
| + | |||
|     |     | ||
| Line 278: | Line 282: | ||
|     |     | ||
| ====nop()==== | ====nop()==== | ||
| - | The NOP instruction stands for no operations.  | + | The NOP instruction stands for no operations.  | 
| - | nop (31) #delay 31 cycles | + | nop () [31] #delay 31 cycles | 
| ====wrap()==== | ====wrap()==== | ||
| Line 324: | Line 328: | ||
| ---- | ---- | ||
| - | ===== Simple Audio Out===== | ||
| - |     | ||
| - | | | ||
| - |     | ||
| - | |------ Audio Out | ||
| - |     | ||
| - | | | ||
| - |     | ||
| - | ---- | ||
| - | ==== Resistor DAC ==== | ||
| - | |||
| - | |||
| - | ---- | ||
| ===== Knowledge ===== | ===== Knowledge ===== | ||
| [[https:// | [[https:// | ||
| Line 346: | Line 337: | ||
| Stepper motor example on [[https:// | Stepper motor example on [[https:// | ||
| - | [[https:// | + | [[https:// | 
| + | |||
| + | [[https:// | ||
| + | |||
| + | ---- | ||
| + | ==== License ==== | ||
| + | |||
| + | This manuals is made by **Wolfgang Spahn** 2021.\\ | ||
| + | Except where otherwise noted, content on this wiki is licensed under the following license: [[http:// | ||
| + | |||
| + | < | ||
| + | <a rel=" | ||
| + | </ | ||
| ---- | ---- | ||