Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:19 28 Jun 2025 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 : olimex ps2 keyboard whit usb plug

Author Message
tenij000
Newbie

Joined: 30/05/2025
Location: Netherlands
Posts: 22
Posted: 08:47am 26 Jun 2025
Copy link to clipboard 
Print this post

ps2 keyboard


if connect it whit


The keyboard must be connected as follows:
 Connect GP8 to PS2 socket CLOCK pin.
 Connect GP9 to PS2 socket DATA pin.
 Connect VBUS (5V) to PS2 socket +5V.
 Connect GND to PS2 socket GND.
The I/O pins for the Pico 2 (RP2350) are 5V tolerant (while powered up)

pico 2 usb A female
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7806
Posted: 10:25am 26 Jun 2025
Copy link to clipboard 
Print this post

I know what the specification says, but I'm still unhappy about connecting a 5V PS2 keyboard to a RP2350 without some sort of level shifting. When you switch on there is a race to get 3V3 onto the GPIO pad of the RP2350 before 5V appears on GP8 and GP9. If the 5V appears first does it put the RP2350 at risk? I simply don't know. I doubt it, but am I willing to take that risk?

If you don't want to take the risk then see if the keyboard will work from 3V3. If it does then you definitely don't need a level shifter. If it doesn't then, as a minimum, put series resistors in the signal lines (try 1K0 - I have a tested value somewhere but I can't find it at the moment) with diodes from GP8 and GP9 up to 3V3. This will clamp the input voltages to something safe.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5016
Posted: 02:04pm 26 Jun 2025
Copy link to clipboard 
Print this post

  tenij000 said  ps2 keyboard


if connect it whit


The keyboard must be connected as follows:
 Connect GP8 to PS2 socket CLOCK pin.
 Connect GP9 to PS2 socket DATA pin.
 Connect VBUS (5V) to PS2 socket +5V.
 Connect GND to PS2 socket GND.
The I/O pins for the Pico 2 (RP2350) are 5V tolerant (while powered up)

pico 2 usb A female


Quick question: Does it actually work ? (I am just curious..)

Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7806
Posted: 03:26pm 26 Jun 2025
Copy link to clipboard 
Print this post

I've just found the (working) board that I used resistor/diode voltage clamping on. The series resistors were 270R and the diodes were BAT85, although most small diodes will do, Schottky is preferable.

Current through the diodes and into the 3V3 supply is restricted by the pullup resistors in the keyboard and the 270R series resistors. The pullup resistors are usually 2K minimum , so it's only about 1.5mA in total over both signal lines. The diodes ensure that the ESD protection diodes in the RP2350 don't pass any appreciable current.

This is a neat way to connect a PS2 keyboard to a 3V3 device. The reference I originally found to it referred to a HP data sheet for a FPGE or something similar but I've lost both references now.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
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 2025