I understand your design as this: you want to communicate between a RPi 4 and a PICO (two boards).
Using USB: potentially possible to connect the two boards via USB (but PICO has just one USB, for all, e.g. power, debug, flashing...).
The "issue": with USB, one board (e.g. RPi 4) has to be host (OK, it has enough USB ports and running Linux to do so). But the PICO has to be running as an USB device. You might need to implement an USB device stack (e.g. if you want to use an USB device like HDI).
Or you could run a USB VCP (virtual UART). PICO is seen as a device with UART interface (via USB), host (RPi 4) runs a "terminal" program.
It might be easier to connect both boards via a SPI or I2C interface. The PICO acts like an "extender", doing some stuff, e.g. measure, drive GPIOs, etc.
But why you cannot use just a RPi 4 for all features you need? (it should have enough GPIOs and interfaces).
A USB communication between two boards (RPi 4 as host, PICO as device) is possible but potentially very complex in terms of SW needed (USB stack). If so, using a VCP UART might be the best option (because PICO has already a virtual UART via USB, just configure RPi 4 to act as a host for such USB VCP device).
Inventing another USB communication approach, e.g. via HDI class might be challenging how to do on PICO.
Or: connect both boards via network: RPi 4 on network, use a PICO /W (with WiFi). Connect both via network.
Just a question about "real time": how fast do you want to be? What is the max. delay possible to fire a command (e.g. from RPi 4 to PICO /W) to do something or to get a response (e.g. a measurement result).
A dedicated interface like SPI or I2C might be faster and more predictable (in terms of "real-time requirements").
Using USB: potentially possible to connect the two boards via USB (but PICO has just one USB, for all, e.g. power, debug, flashing...).
The "issue": with USB, one board (e.g. RPi 4) has to be host (OK, it has enough USB ports and running Linux to do so). But the PICO has to be running as an USB device. You might need to implement an USB device stack (e.g. if you want to use an USB device like HDI).
Or you could run a USB VCP (virtual UART). PICO is seen as a device with UART interface (via USB), host (RPi 4) runs a "terminal" program.
It might be easier to connect both boards via a SPI or I2C interface. The PICO acts like an "extender", doing some stuff, e.g. measure, drive GPIOs, etc.
But why you cannot use just a RPi 4 for all features you need? (it should have enough GPIOs and interfaces).
A USB communication between two boards (RPi 4 as host, PICO as device) is possible but potentially very complex in terms of SW needed (USB stack). If so, using a VCP UART might be the best option (because PICO has already a virtual UART via USB, just configure RPi 4 to act as a host for such USB VCP device).
Inventing another USB communication approach, e.g. via HDI class might be challenging how to do on PICO.
Or: connect both boards via network: RPi 4 on network, use a PICO /W (with WiFi). Connect both via network.
Just a question about "real time": how fast do you want to be? What is the max. delay possible to fire a command (e.g. from RPi 4 to PICO /W) to do something or to get a response (e.g. a measurement result).
A dedicated interface like SPI or I2C might be faster and more predictable (in terms of "real-time requirements").
Statistics: Posted by tjaekel — Sun Sep 01, 2024 8:29 pm