Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:20 13 Oct 2026 Privacy Policy
Jump to

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 : A little hobby project

Author Message
calcmandan

Newbie

Joined: 24/07/2020
Location: United States
Posts: 14
Posted: 02:17am 12 Oct 2026
Copy link to clipboard 
Print this post

I'm asking for confirmation regarding firmware and/or hardware design.

Over the past few weeks, I've slowly been designing a custom, full-sized, 104-key keyboard that will logically integrate with the Pico. I'd seen some videos on the topic demonstrating the PS/2 solution. I thought, how great would it be to have a modern system-in-keyboard device that boots directly into BASIC?

I did some research to find the best microcontroller package with enough I/O for a keyboard matrix while also providing full USB support.

So I'm in a bit of a conundrum, it seems. I had hoped to utilize some of the Pico's pins to accept USB signals from my keyboard's microcontroller, but alas, that doesn't seem possible.

The intent was also to expose the Pico's micro-USB port on the outside of the keyboard shell to make firmware upgrades convenient. After reading through the manual more thoroughly, it seems my concept would only work by adding a janky adapter connecting the micro-USB port to a USB header. That would make firmware updates impossible without cracking open the keyboard shell and removing the adapter to flash the Pico. Adding a USB hub controller would introduce a fair amount of complexity into what initially seemed like a simple project.

After more reading, I realized that the PicoCalc integrates with PicoMite via the I2C pins, but not with the firmware version I was designing this around: HDMIWeb. Plus, it appears the I2C connection used by the PicoCalc requires a driver.

Even then, I'd have to do some bit-banging to mimic the PicoCalc's keyboard signals to work with PicoMite, assuming the firmware supports it in the first place - which it doesn't.

It seems my project has stalled and it's a huge bummer. I'm unsure whether it's even feasible to integrate a USB hub controller to make all this work.

Am I correct? Is there no way to utilize the Pico's pins to accept my keyboard's USB signals and have them recognized by PicoMite?
calcmandan
sysop  : air & wave bbs
finger  : calcmandan@bbs.erb.pw
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3411
Posted: 02:47am 12 Oct 2026
Copy link to clipboard 
Print this post

If your USB keyboard is USB HID compatible any of the MMBasic USB variants should work.
For loading firmware a 2 way switch can switch the Pico USB port from the hub to a USB socket.

The Pico Computer 3 PCB design has an inbuilt USB hub and on board 2 way switch for selecting between operating and firmware loading. It could be replaced with header pins and connected to an external switch.

It also has an onboard USB to Serial adapter for a PC console connection that can run in parallel with the USB keyboard.

Pico Computer 3 And Homemade PC3 Clone And something similar Elemento
Edited 2026-10-12 17:01 by phil99
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6169
Posted: 07:07am 12 Oct 2026
Copy link to clipboard 
Print this post

Hi calcmandan,

You should first of all decide if your design has need for an other usb port beneath the keyboard. For usb stick, mouse, or gamepad. When the answer is yes, then you need a hub anyway.

If no, and you are designing the keyboard controller yourself, then why not use PS2 in stead of USB. Maybe AI can even make this code for you.

There is even a cheap way to do this: get a flea market PS2 keyboard, take the chip out, put it in your design, while replicating the key matrix from the flea market part.

Volhout
Edited 2026-10-12 17:09 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9181
Posted: 07:21am 12 Oct 2026
Copy link to clipboard 
Print this post

Elemento cheats - you have to unplug the hub to program the Pico. PC3x has a switch, like Pico Computer 3 does.

In this instance the problem is with the RPnnnn chip itself. It only supports a single USB port, which is switched into Host mode to attach a keyboard or hub. In this mode it cannot be used for firmware programming or updates. Using a switch or links is an easy option.

I have been toying with a design using a miniature relay to carry out the changeover. The coil is energised using the feed from a micro USB programming socket, which also powers just the Pico via a diode-OR with the main supply from USB-C. Thus, for programming, connect the micro USB to a PC and the system is in programming mode. When that is disconnected, and the USB-C connection made to an internal hub, it reverts to a normal USB host. As yet I've not tested this but I can't see why it shouldn't work. Omron make a tiny SMD DPDT relay that will fit underneath the plug-in USB hub module that I usually use so very little extra board space is needed.

EDIT:
Just a hint. You only get easy access to the USB port of the Pico when using certain versions. It isn't brought out to pins on the 40-pin package and is only available using the TP pads underneath genuine Pico modules, not clones. Their position varies with the Pico model. The big 2035B versions such as the Pimoroni PGA2035 do bring it out. This is one of the keys to the Elemento design. As it is designed to accept any 40-pin package the USB connector had to plug in, there is no other guaranteed way to be able to connect to it.

.
Edited 2026-10-12 17:38 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
Folly
Newbie

Joined: 15/12/2025
Location: Netherlands
Posts: 2
Posted: 09:04am 12 Oct 2026
Copy link to clipboard 
Print this post

Just to let you all know, many USB keyboards (old and new) are also PS2 compatible, even if they do not have a PS2 connector.
Just buy a USB-female connector and wire it up to the PS2 pins and connect a USB keyboard that is PS2 compatible.

Beware : the pico1 needs resistors like described in the manual regarding the PS2-schematic !
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9181
Posted: 09:45am 12 Oct 2026
Copy link to clipboard 
Print this post

Hi Folly, and welcome to the Shed. :)

Strictly speaking a PS2 keyboard needs a proper level shifter. The RPxxxx chips have poor over-voltage protection on their inputs so the 3V6 limit is pretty important. Of course, if you can find a PS2 keyboard that will work from 3V3 that's the ideal solution as it's a direct connection.

The RP2350 (A and B) has *limited* handling of 5V inputs. It can only do it if the VIO pin is at 3V3 which, obviously, isn't the case if the Pico isn't powered. You should ensure that no inputs can get 5V on them under this condition. A level shifter is still a good idea.

Generally, the more expensive a USB keyboard is the less likely it is to have PS2 compatibility. Cheap no-name Chinese keyboards are probably the best as they use old technology chips. Newer keyboards often drop PS2 compatibility as it's no longer required.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
Folly
Newbie

Joined: 15/12/2025
Location: Netherlands
Posts: 2
Posted: 11:01am 12 Oct 2026
Copy link to clipboard 
Print this post

Hi mixtel90,

Thanks for welcoming me :) and the good addon post.
 
wjrii
Newbie

Joined: 03/10/2026
Location: United States
Posts: 3
Posted: 02:11pm 12 Oct 2026
Copy link to clipboard 
Print this post

I'm not sure it counts as less involved than integrating a hub, but in the custom keyboard community (where I spend a lot of my time), there is firmware for converting USB keyboards to PS/2 using a "Pro Micro" Atmel 32u4 microcontroller board between the keyboard and the computer.  That same design could be used without a physical PS/2 port and wiring directly to the level-shifting PS/2 circuit of a PicoMite.  If your  keyboard is using the standard 104 layout, then there should be plenty of room in the case for one more MCU.  :-)

EDIT: Disregard.  I had it backwards about USB to PS/2.  Was late grabbing coffee this morning. Something like the PS2x2Pico  might work though.
Edited 2026-10-13 00:24 by wjrii
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9181
Posted: 02:38pm 12 Oct 2026
Copy link to clipboard 
Print this post

IMHO it would be somewhat short sighted to omit a USB hub now. I realize that the proposal is to build a self-contained keyboard, but a hub gives access to USB sticks, game controllers and mice in addition to keyboards. It's more work, but unless you are happy with a minimal keyboard-only system I would regard it as worthwhile.

You can now use a discrete tucked-away box for the Pico and a more compact Bluetooth keyboard and mouse. No wires needed for them. That would be my approach, personally.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026