Shop Learn
P2 USB Hub? — Parallax Forums

P2 USB Hub?

threadzthreadz Posts: 56
edited 2020-11-19 17:26 in Propeller 2
I know the P2 can act as a usb device and a usb host, but can it do both at once? Could it act as a '2 port' hub where it is a virtual serial port or keyboard or whatever and also allows another device to connect on the same port?

I figure this could be a useful feature for making portable stuff, as it would allow smart devices and SBCs with only a single USB port to connect to the P2 with a high speed bus without losing access to the single usb port for whatever else you might want to plug into the phone, like maybe a headphone adapter or usb sensor thingy that takes more procssing than the P2 preform itself, like an SDR.

If this can be done, what kind of throughput could we expect? How many cogs would it likely take? can it achieve full 31 port hub? where are the limits basically i ask cuz i'm yet
to get my hands on one to test it myself and also know very little about usb protocols


  • SaucySolitonSaucySoliton Posts: 362
    edited 2020-11-20 05:11
    The P2 is a "full speed" USB device/host. The maximum baud rate would be 12 megabits per second. A realistic net throughput would be 1 megabyte per second (8 megabits per second.) That is not really sufficient for SDR. It would not be useful for more than a single FM stereo signal.

    I would take a guess that it would take 1 cog for a hub no matter how many ports were used. That is because the hub only communicates with 1 downstream device at a time.
Sign In or Register to comment.