Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : usb to ps2
Page 3 of 4 | |||||
Author | Message | ||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
NoOne, the ps2x2pico author, seems to be happy to pick up on the idea of going straight from USB to CDC: https://github.com/No0ne/ps2x2pico/issues/20 a second pico would also add the possibility of more I/O pins becoming available to a picomite, albeit over a 1Mbps USB link with data being encoded/decoded into an ascii form along the way! cheers, rob :-) |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
why not vsys to vbus? |
||||
ebbandflow Newbie Joined: 31/08/2023 Location: United StatesPosts: 19 |
Depending on how you power the pico (e.g. battery + USB), an external schottky or P-FET may be needed. The pico datasheet provides in-depth details in sections 4.4 thru 4.6 https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf To prevent back-powering the picomite, I think I've decided against desoldering/reversing the built-in schottky and instead just linking vbus (per the last schematic I posted) & adding an external diode inline between the ps2x2pico's micro-usb and the USB type A socket for the keyboard. Currently looking into power on reset circuits for the psx2pico and thinking about starting simple with a 10uf cap from gnd > run & 10k resistor from run > 3.3v but does anyone have recommendations? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6792 |
You could hold 3V3N low via a 68K resistor to ground on the one you want to prevent booting. Connect that pin to an output on the one you want to boot. Once that boots, raise the pin and run a PAUSE while the other boots. Although the pullup is from 5V you'll get a maximum of 2V on the output pin. . Edited 2023-12-25 19:09 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
ebbandflow Newbie Joined: 31/08/2023 Location: United StatesPosts: 19 |
Thanks Mick! I've implemented a similar solution using the run pin, but am searching for a hardware power on reset for the ps2x2pico to avoid tying up a pin on the picomite to do the reset. So far, my tinkering around with adding a cap and pullup to run have not worked :/ This solution is fully working for me: |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Er,losing the thread. Picomite gets power and sends power to ps2x2pico which powers usb keyboard.. yes? Explain the extra resistors and reset stuff please. The initial circuit looked good but did it have to get messy? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6792 |
Operating the RUN line isn't the same as using 3V3EN. The latter method actually prevents any power to the RP2040 until the other Pico enables it. Using RUN both Picos have to boot and then a reset pulse is forced. Of course, as GPIO pins are floating until SETPIN is used the 3V3EN is definitely low so the SMPS is shut down, much like an off/on switch. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
what's gp16 connected to please? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6792 |
if the Pico on the right pulses GP16 low if forces the Pico on the left to reset. The 10K pullup is a "boots & braces" resistor as RUN already has an onboard pullup, although it's a bit high. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
ebbandflow Newbie Joined: 31/08/2023 Location: United StatesPosts: 19 |
Sorry to be confusing, I'm just tinkering around to see if I can make this work because I want the same end result as you. The first schematic I posted was an idea that did not work until I added the 4k7 resistors to gp13 of the ps2x2pico as shown in the second schematic. This works, but the keyboard does not reconnect to the picomite after a power cycle until resetting the ps2x2pico by the grounding the run pin. This is shown in the third schematic where I connected gp16 of the picomite to the run pin of the ps2x2pico with a 10k pullup to 3v3 as shown. In the third schematic you'll see the code that autoruns from flash slot 1 in order to toggle gp16 on boot. Need to think about Mick's 3v3_en suggestion. Ideally I'd like to get away from using the picomite to toggle the reset and have it happen automatically through a circuit but not quite there yet... more tinkering to do. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
I've not flashed the ps2x2pico.ufl yet, would a usb wireless ie dongle work as usb kb as it does with cable usb. When sorted for 2x pico please share this as it's interesting idea |
||||
ebbandflow Newbie Joined: 31/08/2023 Location: United StatesPosts: 19 |
according to the github info it looks like wireless USB keyboards work but I haven't tried this |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
The idea for me was not using a big keyboard when I don't use a kb often and mini kb are often wireless. a usb wireless dongle giving same data as usb wired. ps ta all for info. if this usb kb idea works then happy days but wait and see for dim problemio Edited 2023-12-26 06:47 by stanleyella |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
If you are having problems why not contact the author? Bill Keep safe. Live long and prosper. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
I was going to ask who is the author but thought I'd look stupid asking. github no-one |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
HaHa. Rob gave a link on the first page of this post. https://github.com/No0ne/ps2x2pico/issues/20 Just for interest the SC version uses the PIO to act as a USB controller. It does not use the Pico's USB socket. Some "clever people" have apparently written a library to do that. Bill Keep safe. Live long and prosper. |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
well that is even better! if we could get a RP2040 to have 2x PIO-based USB hosts, plus the main USB host, then there would be (when using 100% USB, no PS/2 layer) no need for any USB hub... so just hang your USB keyboard (and/or USB mouse) off a couple of GPIO pins. this would be a very nice solution for the CMM2. an interesting side note: i see the RP2040 actually supports 12Mbps USB speeds, ie a usable (approx) 1Mbyte/second link. i wonder if this would be sufficient to allow, some time down the track, placing the video generation on the host RP2040 instead of the picomite? cheers, rob :-) Edited 2023-12-26 11:27 by robert.rozee |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9307 |
What issue of SC was that Pico-based USB thing-y in? I would like to have a read, and I am sure I have the issue here, as I automatically get every issue of SC via Jaycar. Smoke makes things work. When the smoke gets out, it stops! |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
It's the January 2024 issue. The cover is not even on their website yet but I got my printed issue last week. The software IS on their website though. I don't know if Jaycar have it yet, their site is too slow to search for anything. I guess because of their sale. Bill Keep safe. Live long and prosper. |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9307 |
Lovely, thanks. No, I don't have that issue yet, but I will know now to look out for it. Smoke makes things work. When the smoke gets out, it stops! |
||||
Page 3 of 4 |
Print this page |