Hello again. Ive been playing around with my teensy++ 2.0 for bit now, modifying some ergodox code to customize my keyboard, and now I'm ready for the next step. Has any one created ps/2 support for the teensy? As in, I can wire up a ps/2 plug to the pins, patch in some ps/2 protocol to the ergodox source, and use my keyboard as a ps/2 keyboard.
Ideally, I would like to either wire it up to have both usb and ps/2 cables, or just a use a ps/2 adapter on the usb cable.
Ps/2 Protocol for teensy?
-
- Main keyboard: rt101+
- Main mouse: corsair vengeance m90
- Favorite switch: momentary blue alps
- DT Pro Member: -
-
- Location: Stockholm, Sweden
- DT Pro Member: 0011
I don't know if anyone has made specifically a Teensy a PS/2 client, but there are keyboards with the ATmega32A running the PS2AVR firmware which talks PS/2. I don't think it would be too difficult to make the ATmega32U4 of the Teensy 2.0 run it, as those microcontrollers are quite similar. The ATmega32U4 has USB hardware where as the other µC does not.
There are USB versions of the PS2AVR that bit-bangs the USB data lines directly instead of going through hardware - I don't know if they support both protocols or not though.
There are USB versions of the PS2AVR that bit-bangs the USB data lines directly instead of going through hardware - I don't know if they support both protocols or not though.
-
- Main keyboard: rt101+
- Main mouse: corsair vengeance m90
- Favorite switch: momentary blue alps
- DT Pro Member: -
awesome! this might be just what i was looking for, thanks for the help.
-
- Location: Stockholm, Sweden
- DT Pro Member: 0011
PS/2 is faster than USB, but only in the best case. However, debouncing and other lag in the system is much longer so the extra speed is not that significant.
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
PS/2 is easier to get your head around. USB HID is likely to be the most complex wired protocol ever used with keyboards. But it's USB so it won. Bluetooth may be more complex still, in the wireless realm. But I'm not going into that spooky house before you guys!
- flabbergast
- Location: Southampton, UK
- DT Pro Member: 0120
- Contact:
Here: http://dkudrow.blogspot.co.uk/2013/08/p ... o-uno.html is a code for arduino that can emulate a PS/2 device. He also writes about the PS/2 protocol a little - might be interesting to understand what's going on. Translating arduino code to pure avr-gcc code is usually not too difficult, but requires some work (generally just unwrap C++ classes to pure C functions, and replacements of pinMode, digitalWrite, delayMicroseconds by the appropriate avr-gcc code).
-
- Main keyboard: rt101+
- Main mouse: corsair vengeance m90
- Favorite switch: momentary blue alps
- DT Pro Member: -
Nice flabbergast, thanks for the link. I mostly just want my keyboard to be able to work as both a ps/2 device and a usb device. I have a ps/2 kvm switch that I'm thinking about modifying to have a usb for the mouse, and ps/2 for the keyboard.
I'm not quite sure which I prefer, ps/2 has some advantages, though my keyboards debounce is set at 15ms, so that might not be such an advantage. The kvm switch at least allows me to hot swap it around a bit so that takes care of one of the major drawbacks.
I'm not quite sure which I prefer, ps/2 has some advantages, though my keyboards debounce is set at 15ms, so that might not be such an advantage. The kvm switch at least allows me to hot swap it around a bit so that takes care of one of the major drawbacks.