Skip to content

Add an example to trasmit RS422 signal#691

Open
yoneken wants to merge 3 commits into
raspberrypi:developfrom
yoneken:add-pio-rs422-tx
Open

Add an example to trasmit RS422 signal#691
yoneken wants to merge 3 commits into
raspberrypi:developfrom
yoneken:add-pio-rs422-tx

Conversation

@yoneken

@yoneken yoneken commented Aug 1, 2025

Copy link
Copy Markdown

This example modifies the pio_uart_tx sample to implement RS-422 transmit functionality. It utilizes the PIO state machine to generate the differential signal directly, eliminating the need for an external line driver IC to send "Hello, world!"

Comment thread pio/rs422_tx/rs422_tx.c
Comment thread pio/rs422_tx/rs422_tx.pio Outdated
@lurch

lurch commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

Example is failing to build in CI:

/opt/actions-runner/_work/pico-examples/pico-examples/pico-examples/pio/rs422_tx/rs422_tx.pio:27.9-12: syntax error, unexpected next
   27 |     jmp next    side 0b01 [3]
      |         ^~~~
/opt/actions-runner/_work/pico-examples/pico-examples/pico-examples/pio/rs422_tx/rs422_tx.pio:30.1-4: syntax error, unexpected next
   30 | next:
      | ^~~~
gmake[2]: *** [pio/rs422_tx/CMakeFiles/pio_rs422_tx_rs422_tx_pio_h.dir/build.make:73: pio/rs422_tx/rs422_tx.pio.h] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:8066: pio/rs422_tx/CMakeFiles/pio_rs422_tx_rs422_tx_pio_h.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....

This is probably because next is a keyword used by the wait and irq PIO instructions, and so pioasm doesn't allow next be used as a label, as identified by the comments on raspberrypi/pico-sdk#1042

@yoneken

yoneken commented Aug 5, 2025

Copy link
Copy Markdown
Author

I changed the label.
Thank you.

@lurch

lurch commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

I changed the label. Thank you.

Thanks @yoneken , CI is building cleanly now 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants