First post, by Mike_
Hello, it looks like there are already several similar projects, but they all seem to be external. So I decided to make my own version based on ATtiny4313 and MAX232, that is mounted internally to an expansion slot and connects to a serial header. Power is drawn from a floppy power connector.
Here's a refined version version with following features:
-Support for normal 1200 baud serial, or 9600 baud high speed mode, which requires modified drivers.
-Sample rate is configured with jumpers, options are 20/40/60/100/200. For higher than 40, 9600 baud serial is needed.
-Mouse resolution is configured with jumpers
-Footprint both for PS/2 and USB-A connector, just populate one depending on your needs
-Support for 3-button and wheel mouse (2-button mouse is reported as a 3-button one)
-Support for hotplugging
-Workarounds for supporting quirky KVM switches, such as combining movement packets
-Crystal oscillator for ensuring accurate baud rate
-TVS diodes for ESD protection
-Overcurrent protection using ATtiny2313's onboard analog comparator and a P-type MOSFET as a switch
-No SMD components, so it's easy to assemble (well, except the DPAK MOSFET used to turn power on and off, but anybody should be able to solder that thing)
-Programming via SPI header
It works well with the mice I have had available for testing, which include an old Microsoft 2-button PS/2 mouse and a couple of USB Microsoft Basic Optical Mouse with PS/2 support. Some KVM switches ignore commands to set sample rate, so as a new feature the adapter combines movement packets if they are arriving faster than they can be sent through serial bus. This can happen only in 1200 baud mode.
I used modified mouse drivers found here for testing high speed mode: https://github.com/LimeProgramming/USB-serial … apter/tree/main
Repo of this project is found here: https://github.com/mniemela/PS2toSerial