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, KVM switches should work in 9600 baud mode.
-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. Current version should work with KVM switches as long as you use 9600 baud mode. 1200 baud mode works with some KVMs, but not the ones that ignore command to set sample rate. This results in erratic mouse movement, as more samples are arriving than can be sent to PC's serial port.
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