-
Notifications
You must be signed in to change notification settings - Fork 42
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
Built-in software USB Hub on PIO SM #65
Comments
Hi, I'm actually using this already for the ITX-Llama integration: eivindbohler/itxllama#2 I think this would be most suitable with a custom PCB discussed here: #57 |
Currently both PIOs are used for PS/2 output and input. So either PS/2 input has to be disabled or a Pico 2 (RP2350) will be needed. |
But isn’t it possible to spin both PS/2 on one PIO only on different SM, and USB on another PIO? |
Yes thats what I'm doing on the ITX-Llama. There is no PS/2 input/passthru on the ITX-Llama, but the normal ps2x2pico has that feature enabled. |
But in RP2040, one PIO has four SMs, is it really impossible to process two PS/2 interfaces with them?
|
Yes, its already working, one PIO is used for output and one for input. If the input is disabled it can be used for USB as seen on the ITX-Llama. Do you want to try this out? |
Yes, it would be interesting, where can I see the schematic and firmware? |
I don't have any schematic as I don't have any KiCAD skills, but we can agree on using GPIO16/17 and GPIO18/19 as D+/D- and I'll send you a testing firmware build. |
OK! I'll try to assemble a prototype of such an adapter device and let you know... and also, will it be possible to use arbitrary pairs of ports for USB interfaces, for example GP0, GP1 and GP2, GP3? |
Correct, any GPIO pairs are working (without space between D+/D- and none of the PS/2 pins ;) |
Try this: pio-usb-test.zip |
Just a question out of curiosity: |
Now all three ports should work: pio+native-usb-test.zip |
👋 I'd be happy to put together a KiCAD schematic and PCB for this. I have a few questions first:
Personally, I like the smaller form factor of the Waveshare and the built-in USB-C port. I'm not super keen on making boards for both the rPi & Waveshare footprints since I'd then feel obligated to build, test and stock them for people who want a ps2x2pico without any soldering. Oh, and I guess maybe we should move this conversation over to #57 since it's about the hardware and this ticket is about the software? |
I'd second this. Properly wired PS/2 combo-port breakout cables are surprisingly difficult to find cheaply in Canada so, for the ps2x2pico I built, I just bought a dirt-cheap PS/2 male-to-male cable (Seriously. Why?) from China, cut it in half, and made some little printer-paper-and-scotch/sellotape flags to say which one to plug into the keyboard port and which one to plug into the mouse port.
As a data point, I like the USB-C port on my YD-RP2040, but a big part of the reason I chose it was that it was the most inexpensive thing I could find. I didn't want to be paying more for the PS/2-to-USB adapter than I paid for the thin client I was repurposing into a fanless Win98SE retro PC. |
Which version of the source code does this file correspond to? I would like to make a version. Is that possible? |
Its currently in a separate branch: https://github.com/No0ne/ps2x2pico/tree/65-built-in-software-usb-hub-on-pio-sm |
Look, people are already making adapter boards using a simplified scheme. :)) |
I hope this message finds you well. I have followed the schematic from this comment to design my PCB for the Pico Zero version. After flashing the firmware, I noticed that there is no response from the inputs and outputs. Additionally, I am unsure where to set the GPIO pins for the USB port, and the LED configuration has not been updated for the Zero version, so the LEDs do not light up. However, when I flash the latest code, the USB host input for keyboard and mouse works correctly, and the PS/2 output also functions as expected. |
When using the ps2x2pico adapter to simultaneously connect a USB keyboard and mouse, you have to connect them via an external USB hub, which creates additional inconveniences and not all of them are suitable.
Perhaps a good solution would be to use the Pico-PIO-USB library for software implementation of two separate USB-A ports for separate connection of a USB keyboard and USB mouse?
At the same time, the hardware USB port of Pico will remain free for other applications... for example, connecting gamepads with mapping to keyboard buttons.
https://github.com/sekigon-gonnoc/Pico-PIO-USB
The text was updated successfully, but these errors were encountered: