Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
raspberrypipico:pico_pio [2021/03/13 19:29] admin [in(source, bitcount)] |
raspberrypipico:pico_pio [2021/03/13 21:35] admin [nop()] |
||
---|---|---|---|
Line 152: | Line 152: | ||
| | ||
- | ====wait()==== | + | ====wait(option)==== |
**wait(// | **wait(// | ||
It will waits until the specified GPIO has the specified polarity.\\ | It will waits until the specified GPIO has the specified polarity.\\ | ||
Line 166: | Line 166: | ||
- num (interrupt number, with rel the relative interrupt numbers could be used)\\ | - num (interrupt number, with rel the relative interrupt numbers could be used)\\ | ||
+ | | ||
====in(source, | ====in(source, | ||
Line 178: | Line 179: | ||
- 0-31 bits\\ | - 0-31 bits\\ | ||
- | ====out(destination, | + | ====out(destination, |
The OUT instructor shifts data from the output shift register (OSR) to the destination.\\ | The OUT instructor shifts data from the output shift register (OSR) to the destination.\\ | ||
**destination: | **destination: | ||
Line 188: | Line 189: | ||
- pc (shifts an instruction into the program counter)\\ | - pc (shifts an instruction into the program counter)\\ | ||
- isr (into the input shift registers)\\ | - isr (into the input shift registers)\\ | ||
- | **bitcount:**\\ | + | **bits:**\\ |
- 0-31 bits\\ | - 0-31 bits\\ | ||
Line 234: | Line 235: | ||
mov(osr, x) #copy the x scratch register to the output shift register | mov(osr, x) #copy the x scratch register to the output shift register | ||
- | ====irq(option, | + | ====irq(option, |
The IRQ instruction sets or clears an interrupt flag.\\ | The IRQ instruction sets or clears an interrupt flag.\\ | ||
**option**\\ | **option**\\ | ||
Line 240: | Line 241: | ||
- wait (wait until the flag is zero before setting it)\\ | - wait (wait until the flag is zero before setting it)\\ | ||
- clear (clears the flag)\\ | - clear (clears the flag)\\ | ||
- | **irq_num**, number of the interrupt 0-7\\ | + | **num** number of the interrupt 0-7\\ |
- | **rel** relative IRQ number, can set different IRQ per StateMachine, | + | **rel** relative IRQ number\\ |
In the StateMachine | In the StateMachine | ||
| | ||
Line 278: | Line 279: | ||
| | ||
====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()==== |