pico-feedback icon indicating copy to clipboard operation
pico-feedback copied to clipboard

Feature request: pioasm: multiple programs

Open smurfix opened this issue 3 years ago • 3 comments

Let's say I want to use the PIO for something UART-like. Now obviously this requires a send program and a receive program. I want to pack both into one PIO device because they're both small enough.

My problem is that there seems to be no clean way to do that: pioasm doesn't tell me how long the first program is, thus I have no way to set the .offset for the second program correctly.

smurfix avatar May 04 '22 09:05 smurfix

Have a look at some of the examples in https://github.com/raspberrypi/pico-examples/tree/master/pio/ https://github.com/raspberrypi/pico-examples/tree/master/pio/ir_nec/nec_transmit_library is an example that uses multiple PIO programs (and there might be others if you dig around? :man_shrugging: )

lurch avatar May 04 '22 11:05 lurch

And I've not tried it myself, but you might want to look at https://github.com/harrywalsh/pico-hw_and_pio-uart-gridge/tree/HW_and_pio_uarts

lurch avatar May 04 '22 11:05 lurch

Ah. Thanks. So this seems more like a documentation problem, as e.g. the basic UART example should point us towards how to do that.

smurfix avatar May 04 '22 13:05 smurfix