Single MOSI MISO pin via asm_pio #16724
Unanswered
JonPark0
asked this question in
RP2040 / Pico
Replies: 1 comment
-
you can't do 'jmp rx' as a pushed instruction. The code that compiles that has no idea where 'rx' is. You can make the first thing the state machine does is pull a single value, which can be zero or one, and then either jump to the write or read code based on it. In your case, it might just be easier to make two separate PIO programs, though, and start one state machine with the read program, and the other with the write program, unless you are running out of state machines. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
Currently I am writing a code for WeMos 4.2 inch e-paper display which uses SSD1683 epd driver.
On the micropython documentation, both MOSI and MISO should be defined to use default SPI class.
Since most of the spi based displays doesn't require MISO communication, I usually just put unused pin to define MISO.
While trying to enhance performance for both communication side and MCU side, I found out that using PIO feature might help this pin defining problem.
Based on these informations, I wrote a basic code. (which looks like the one in below)
I didn't tested yet since it only has minimal function which only can write/read command and data with it, and also because I'm not sure if this is the right way to use pio_asm.
Can anyone please review this code if this is the right way to use pio_asm? It will be so grateful if I can get any advice from here.
Beta Was this translation helpful? Give feedback.
All reactions