Skip to content

Add an example to trasmit RS422 signal #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

yoneken
Copy link

@yoneken yoneken commented Aug 1, 2025

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!"

@lurch
Copy link
Contributor

lurch commented Aug 5, 2025

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
Copy link
Author

yoneken commented Aug 5, 2025

I changed the label.
Thank you.

@lurch
Copy link
Contributor

lurch commented Aug 5, 2025

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