modelUartDuo

Two Raspberry Pi Pico talking over TWO serial links at the same time: UART(0) on GP0/GP1, UART(1) on GP4/GP5 - the two UART engines of the RP2040, each with its own wires

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

Two RPi_Pico talking over two real serial links at the same time: UART(0) on GP0/GP1 and UART(1) on GP4/GP5, the default pins of the two UART engines of the RP2040. Board A (uart_duo_a.py) sends PING n on the first link and HELLO n on the second, five times; board B (uart_duo_b.py) answers PONG n and WORLD n on the respective link. In the log, A prints SENT n then BOTH n when both replies of the round arrived together - the two engines really run in parallel.

Since the refactoring of the micro:bit radio (decision "Radios micro:bit" of requirements.md), the runtime carries two UART engines: machine.UART(0) and machine.UART(1) are now independent - on the micro:bit, the second one belongs to the on-board radio. See Examples.MultiMcu.Uart for a single link between two MCU.

Components

TypeNameDefaultDescription
RPi_PicopicoABoard A: Resources/Scripts/MCU/uart_duo_a.py (UART(0) on GP0/GP1, UART(1) on GP4/GP5)
RPi_PicopicoBBoard B: Resources/Scripts/MCU/uart_duo_b.py (same pins, answers PONG and WORLD)
Modelica.Electrical.Analog.Basic.Groundground