$ make -f Makefile.rev2 clean
$ make -f Makefile.rev2 KEYMAP=plain
$ make -f Makefile.rev2 KEYMAP=plain dfu
I've got a bolt modded model M that I split the backspace into 2 keys, and rearranged others (see link in sig, if you're curious).
If I'm reading this correctly, I could use this project to modify the keymap in the converter, thereby obviating the necessity of registry hacks or xmodmap or whatever. Is this correct?
I like the github 404 :-p
(https://github.com/tmk/tmk_keyboard/ps2_usb/ should be https://github.com/tmk/tmk_keyboard/tree/master/ps2_usb, I think).
Nice work, again, hasu :-)
Just to check, will this work with a teensy++, or just a teensy? I ask because the teensy is currently out of stock. I assume teensy only, so I guess I will just have to wait, which is a shame.
I'm definitely interested in trying this out and providing feedback. Especially since right now, the registry hack thing is only a viable solution for windows. This will make the keyboard work properly, regardless of physical system it is connected to.
Also, the split backspace does send distinct scan codes, so it theoretically should work.
Thanks, Hasu!
Great work! I would love to try it, sadly Teensy is entirely sold out everywhere in Germany since everyone uses it for PS3 piracy.
/*
* PS/2 Scan Code Set 2: Exceptional Handling
*
* There are several keys to be handled exceptionally.
* The scan code for these keys are varied or prefix/postfix'd
* depending on modifier key state.
*
* References:
* http://www.microsoft.com/whdc/archive/scancode.mspx
* http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
*
*
* Insert, Delete, Home, End, PageUp, PageDown, Up, Down, Right, Left:
* Num Lock: off
* modifiers | make | break
* ----------+---------------------------+----------------------
* Ohter | <make> | <break>
* LShift | E0 F0 12 <make> | <break> E0 12
* RShift | E0 F0 59 <make> | <break> E0 59
* L+RShift | E0 F0 12 E0 F0 59 <make> | <break> E0 59 E0 12
*
* Num Lock: on
* modifiers | make | break
* ----------+---------------------------+----------------------
* Other | E0 12 <make> | <break> E0 F0 12
* Shift'd | <make> | <break>
*
* Handling: ignore these prefix/postfix codes
*
*
* Keypad-/:
* modifiers | make | break
* ----------+---------------------------+----------------------
* Ohter | <make> | <break>
* LShift | E0 F0 12 <make> | <break> E0 12
* RShift | E0 F0 59 <make> | <break> E0 59
* L+RShift | E0 F0 12 E0 F0 59 <make> | <break> E0 59 E0 12
*
* Handling: ignore these prefix/postfix codes
*
*
* PrintScreen:
* With hoding down modifiers, the scan code is sent as following:
*
* modifiers | make | break
* ----------+--------------+-----------------------------------
* Other | E0 12 E0 7C | E0 F0 7C E0 F0 12
* Shift'd | E0 7C | E0 F0 7C
* Control'd | E0 7C | E0 F0 7C
* Alt'd | 84 | F0 84
*
* Handling: ignore prefix/postfix codes and treat both scan code
* E0 7C and 84 as PrintScreen.
*
* Pause:
* With hoding down modifiers, the scan code is sent as following:
*
* modifiers | make(no break code)
* ----------+--------------------------------------------------
* no mods | E1 14 77 E1 F0 14 F0 77
* Control'd | E0 7E E0 F0 7E
*
* Handling: treat these two code sequence as Pause
*
*/
Great work! I would love to try it, sadly Teensy is entirely sold out everywhere in Germany since everyone uses it for PS3 piracy.
You could try one of these: http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=280606391720&ssPageName=STRK:MEWAX:IT
It's one of the few Teensy alternatives that actually looks OK Many of them are copies of the original Teensy, not the 2.0 version with atmega32u4 chip. I've just ordered one to test it out... we'll see...
kishy,
I have read "USB converter" page in your signature, is dfj's converter firmware available to public? I couldn't found it by my quick search.
It must be very useful to us if its source code is also available.
Both teensy implementations are not-quite released as open-source yet, but can be had from the folks on the IRC channel #geekhack if you can stand it there. :P
Whoah - lookee that. I coulda bought that along with my HHKB Killer.
A better deal is this one on ebay from noogroove: http://cgi.ebay.com/NooGroove-USB-Board-ATMEGA32-AT90USB162-AVR-Stick-DFU-/150568104102?pt=LH_DefaultDomain_2&hash=item230e8ef0a6
The ATMEGA32U2 has twice the RAM (1KB) of the dealextreme one (AT90USB162), but still less than the 2.5KB of a real PJRC Teensy 2.0 (ATMEGA32U4).
And you'll probably get it a lot quicker!
No worries! I bought a couple of them, they got here (UK) in about a week which is pretty good. Not done a lot with them yet though, because I've got Teensy 2.0 and Teensy++ 2.0 boards to play with as well :-)
A better deal is this one on ebay from noogroove: http://cgi.ebay.com/NooGroove-USB-Board-ATMEGA32-AT90USB162-AVR-Stick-DFU-/150568104102?pt=LH_DefaultDomain_2&hash=item230e8ef0a6
Yup - it's big! Drop shipped from India. Seems to work fine, but I keep going back to the Teensy for development because the loader is nicer.
#include <stdbool.h>
bool ralt_rec;
if (code == KB_RALT) {
ralt_rec = true;
}
if (code == KB_NO) {
// do nothing
} else if (IS_MOD(code)) {
host_add_mod_bit(MOD_BIT(code));
} else if (IS_FN(code)) {
fn_bits |= FN_BIT(code);
}
// Ugly hack to simulate the missing 102-european-key on IBM-M Keyboard
// ">" on key "C"
else if (( code == KB_C) && ( ralt_rec == true )) {
host_add_key(KB_RSHIFT);
host_add_key(KB_NONUS_BSLASH);
_delay_ms(200);
ralt_rec = false;
// "<" on key "X"
} else if (( code == KB_X) && ( ralt_rec == true )) {
host_add_key(KB_NONUS_BSLASH);
_delay_ms(200);
ralt_rec = false;
// "\" on key "Z"
} else if (( code == KB_Z) && ( ralt_rec == true )) {
host_add_key(KB_RALT);
host_add_key(KB_NONUS_BSLASH);
_delay_ms(200);
ralt_rec = false;
}
else if (IS_KEY(code)) {
host_add_key(code);
}
#ifdef MOUSEKEY_ENABLE
else if (IS_MOUSEKEY(code)) {
mousekey_decode(code);
}
} else if (IS_MOD(code)) {
host_add_mod_bit(MOD_BIT(code));
host_add_key(KB_RSHIFT);
host_add_key(KB_NONUS_BSLASH);
host_add_key(KB_NONUS_BSLASH);
host_add_mod_bit(MOD_BIT(code));
diff --git a/keyboard.c b/keyboard.c
index 03db325..3e2a11c 100644
--- a/keyboard.c
+++ b/keyboard.c
@@ -33,6 +33,7 @@ void keyboard_init(void)
void keyboard_proc(void)
{
uint8_t fn_bits = 0;
+ static bool remove_ralt = false;
matrix_scan();
@@ -89,7 +90,37 @@ void keyboard_proc(void)
}
#endif
else if (IS_KEY(code)) {
- host_add_key(code);
+ if (keyboard_report_prev->mods & MOD_BIT(KB_RALT) || remove_ralt) {
+ if (code == KB_Z) {
+ // '\' on Swiss keyboard
+ host_add_key(KB_NONUS_BSLASH);
+ remove_ralt = false; // keep RAlt
+ // for test. You can remove this.
+ //host_add_key(KB_TAB); // Alt + Tab (for test)
+ //remove_ralt = false; // keep RAlt
+ } else if (code == KB_X) {
+ // '<' on Swiss keyboard
+ host_add_key(KB_NONUS_BSLASH);
+ remove_ralt = true;
+ // for test. You can remove this.
+ //host_add_mod_bit(MOD_BIT(KB_LSHIFT)); // LShfit + 2 (for test)
+ //host_add_key(KB_2);
+ //remove_ralt = true;
+ } else if (code == KB_C) {
+ // '>' on Swiss keyboard
+ host_add_mod_bit(MOD_BIT(KB_LSHIFT));
+ host_add_key(KB_NONUS_BSLASH);
+ remove_ralt = true;
+ // for test. You can remove this.
+ //host_add_mod_bit(MOD_BIT(KB_RSHIFT)); // RShfit + 3
+ //host_add_key(KB_3);
+ //remove_ralt = true;
+ } else {
+ host_add_key(code);
+ }
+ } else {
+ host_add_key(code);
+ }
}
#ifdef MOUSEKEY_ENABLE
else if (IS_MOUSEKEY(code)) {
@@ -101,6 +132,13 @@ void keyboard_proc(void)
}
}
}
+ if (remove_ralt) {
+ if (keyboard_report->mods & MOD_BIT(KB_RALT)) {
+ host_set_mods(keyboard_report->mods & ~MOD_BIT(KB_RALT));
+ } else {
+ remove_ralt = false;
+ }
+ }
layer_switching(fn_bits);
Weird, it seems that Soarer's adapter can take USB input?
http://geekhack.org/showwiki.php?title=Island:17458&viewfull=1&page=7&do=comments#post343781
Which by definition leaves out the Noppoo and it's brethren
And the Unicomps, Realforces, and HHKB. Likely others, as well.
... thinking of all the Filcos, Leopolds, Decks, etc that achieve NKRO when plugged into a PS/2 port with one of those USB to PS/2 adapters.
There's no way to unify it all... There are multiple firmware available and they are all written differently and have different features. There are some that are available as source, and some that aren't (yet). Examples and instructions are generally found in the wikis pertaining to the different firmware. There are no truly clear instructions because there is no one way to do this sort of thing.
Depends on if you want to do a PCB conversion or PS/2. Sometimes teensy++ required for PCB conversion since it has more IO lines, otherwise teensy is fine. teensy firmware is written with a simple program over USB on most any desktop platform.
If you are doing a custom PCB or wire-wrap job like it sounds 7bit, it's usually done as a matrix of switches and PrinsValium's wiki (http://geekhack.org/showwiki.php?title=Design+your+own+Teensy+keyboard+in+KiCAD+how-to+guide) is most helpful there.
I'm in the middle of doing it.
die("Unknown MCU type\n");
I was admittedly vague on the whole firmware thing... had meant to go back and flesh that out, but I'm working.
There's a small app for writing the firmware to the teensy over USB. That's what I had referred to, but of course this requires a firmware. There are several available, they all differ and some do not yet have source available. I started by playing with the HumbleHacker FW, he used some crazy framework to make it really user friendly but I can't even begin to understand how the code works without learning the framework. It's nice in that you can just hook up a matrix to some pins, tell the firmware what pins and then the FW helps you map your matrix. It's perfect for a controller replacement if you can live with its features.
I then moved on to looking at how Hasu and HaaTa did their firmwares to try and learn how to scratch build one with the features I want. This means knowing more about the matrix up front, no problem since I created it. Hasu's is not ready for a newb to put together a PCB/matrix version, it's very ready as a dongle for PS/2 tho. HaaTa's is more ready for a PCB/matrix job. Either way both will require modifying the code, not just plugging in some pin names/numbers and running with it.
Soarer's sounds awesome... but there's no code so you can only do (so far) the dongle.
As for compiling (and coding) the firmware. You can go with Win-AVR as the compiler, and of course use whatever editor you want. If you're on unix you can set up a cross-compiling gcc for avr. There is AVRStudio which comes with a compiler or can use Win-AVR as its compiler. It has a pile of features I know nothing about including a simulator.
avrfreaks.net has a nice quick build script (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=42631) that I hacked to get rid of some unwanted pieces.
Hey hasu, I sent you a pm but I think this could be useful for some other members so I'll post it here.
I must thank you for your work on this converter code. I've tried a couple ps2->usb converters for my trusty old Dell AT101W, but with limited success, often they would not always register Shift properly, or would just have terrible rollover effects (keys repeating, missing, etc). I've only been using your code + teensy 2.0 for a few hours, but it's already worlds better!
I am still having one strange issue, and I am not sure what the cause might be, but some of the punctuation chars (? and ; keys) work, but have a large delay in triggering. Seriously delay, easily 100+ms delay from when I press, to when it actually inputs. Yet the other keys, all around them, are 100% fine. Obviously this doesn't happen on another machine that has a direct ps2 port still.
You have pull-up resistors on you Teensy? Without pull-up resistors it might cause similar problems.Hasu, I do not yet have the resistors on my Teensy, however I have not had this problem at all. I will add the resistors, if I find it to be a problem.
Hmm, I have not tested it much with disabling mousekeys. This option may cause your problem.[/QUOTE]
Those keys(; and /) on default layer are Fn keys used to change keymaps and which needs some complicated logic. This is problematic part.
Try LShift+RShift+1 to use plain QWERTY keymap without any Fn keys. I think you have no problem there.
You can make this plain keymap as default by editing keymap.c.
REVENGE, thanks for the link.Roger that, I'll be looking into this, thanks! :D
Hmm, those waveform will not work with my converter on Teensy too. I think AVR USART hardware can handle that fast signal without timing problem.
While my Teensy converter uses PS/2 handler implemented with software(poor my C lang), V-USB converter uses this USART hardware to reduce cycles for PS/2 handling. Of course you can use the USART hardware on Teensy too.
You have two option to take: building a V-USB converter or using USART on Teensy one.
Looking these files will help you.
ps2_usb/Makefile.vusb
ps2_usb/config_vusb.h
ps2_usart.c
I added some files to support USART implementation.Sweet, getting it now to build. For the makefile and config, I actually had almost exactly the same thing as you (even named the files the same, teehee....) except my pin defs are different. I'm guessing I can't customize those and have to use what you set?
Try latest source and do 'make -f Makefile.pjrc_usart'.
Note that pin configuration for this is different from 'simple and stupid' one. Connect Clock line to PD5 pin and Data to PD2.
F2 is not present on ATMega32U4(Teensy 2.0).No, I needed to wake up and start paying attention, that's what. :P
But why do you find F2? you need D2 and D5 as I described before.
You need sleep? Me too :) I got to go to bed now.
diff --git a/ps2_usart.c b/ps2_usart.c
index 7d591c6..7160f57 100644
--- a/ps2_usart.c
+++ b/ps2_usart.c
@@ -127,7 +127,7 @@ uint8_t ps2_host_send(uint8_t data)
WAIT(clock_lo, 15000, 1);
/* data [2-9] */
for (uint8_t i = 0; i < 8; i++) {
- _delay_us(15);
+ _delay_us(1);
if (data&(1<<i)) {
parity = !parity;
data_hi();
@@ -138,12 +138,12 @@ uint8_t ps2_host_send(uint8_t data)
WAIT(clock_lo, 50, 3);
}
/* parity [10] */
- _delay_us(15);
+ _delay_us(1);
if (parity) { data_hi(); } else { data_lo(); }
WAIT(clock_hi, 50, 4);
WAIT(clock_lo, 50, 5);
/* stop bit [11] */
- _delay_us(15);
+ _delay_us(1);
data_hi();
/* ack [12] */
WAIT(data_lo, 50, 6);
text data bss dec hex filename
13734 18 114 13866 362a ps2_usb_pjrc.elf
REVENGE,Weird, I thought I posted already...
Did you try my patch? I want to hear the result. thanks.
I updated this project to support my DIY hardware. Fixed some bugs and add improvements.
https://github.com/tmk/keyboard_converter
Pic of herd of converters.Show Image(http://i.imgur.com/6x42ENDl.jpg)
The converter on V-USB lacks some features for now: USB NKRO and System/Media control.
powercfg -devicequery wake_armed
in CMD the Converter isn't listed... meaning that it doesn't support wake from sleep. Hi there.
Is it possible to use this project also with Arduino Leonardo?
Thanks.
yes, it works.
Glad to hear it works!
TMK VUSB doesn't support remote wakeup feature unfortunately while LUFA and PJRC stack support.
It is definitely possible to implement the feature on V-USB, but I have no time and plan to do so for a while.
# Target file name (without extension).
TARGET = ps2_usb_vusb
# Directory common source filess exist
TMK_DIR = ../../tmk_core
# Directory keyboard dependent files exist
TARGET_DIR = .
# keyboard dependent files
SRC = keymap_common.c \
matrix.c \
led.c
ifdef KEYMAP
SRC := keymap_$(KEYMAP).c $(SRC)
else
SRC := keymap_plain.c $(SRC)
endif
CONFIG_H = config.h
# Use USART for PS/2. With V-USB INT and BUSYWAIT code is not useful.
PS2_USE_USART = yes
# V-USB debug level: To use ps2_usart.c level must be 0
# ps2_usart.c requires USART to receive PS/2 signal.
OPT_DEFS += -DDEBUG_LEVEL=0
# MCU name, you MUST set this to match the board you are using
# type "make clean" after changing this, so all files will be rebuilt
#MCU = at90usb162 # Teensy 1.0
#MCU = atmega32u4 # Teensy 2.0
#MCU = at90usb646 # Teensy++ 1.0
#MCU = at90usb1286 # Teensy++ 2.0
MCU = atmega328p
# Processor frequency.
# Normally the first thing your program should do is set the clock prescaler,
# so your program will run at the correct speed. You should also set this
# variable to same clock speed. The _delay_ms() macro uses this, and many
# examples use this variable to calculate timings. Do not add a "UL" here.
F_CPU = 16000000
# Build Options
# comment out to disable the options.
#
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
#NKRO_ENABLE = yes # USB Nkey Rollover
NO_UART = no # UART is unavailable
#---------------- Programming Options --------------------------
AVRDUDE = avrdude
# Type: avrdude -c ? to get a full listing.
AVRDUDE_PROGRAMMER = usbasp
AVRDUDE_PORT =
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
# Uncomment the following if you want avrdude's erase cycle counter.
# Note that this counter needs to be initialized first using -Yn,
# see avrdude manual.
#AVRDUDE_ERASE_COUNTER = -y
# Uncomment the following if you do /not/ wish a verification to be
# performed after programming the device.
#AVRDUDE_NO_VERIFY = -V
# Increase verbosity level. Please use this when submitting bug
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
# to submit bug reports.
#AVRDUDE_VERBOSE = -v -v
#AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_FLAGS = -p $(MCU) -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
# Boot Section Size in bytes
# Teensy halfKay 512
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBasp 2048
OPT_DEFS += -DBOOTLOADER_SIZE=512
# Search Path
VPATH += $(TARGET_DIR)
VPATH += $(TMK_DIR)
include $(TMK_DIR)/protocol.mk
include $(TMK_DIR)/common.mk
include $(TMK_DIR)/protocol/vusb.mk
include $(TMK_DIR)/rules.mk
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include <avr/interrupt.h>
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6512
#define DEVICE_VER 0x0001
#define MANUFACTURER t.m.k.
#define PRODUCT PS/2 keyboard converter
#define DESCRIPTION convert PS/2 keyboard to USB
/* matrix size */
#define MATRIX_ROWS 32 // keycode bit: 3-0
#define MATRIX_COLS 8 // keycode bit: 6-4
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \
keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \
)
//#define NO_SUSPEND_POWER_DOWN
/*
* PS/2 Busywait
*/
#ifdef PS2_USE_BUSYWAIT
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 1
#define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 0
#endif
/*
* PS/2 Pin interrupt
*/
#ifdef PS2_USE_INT
/* uses INT1 for clock line(ATMega32U4) */
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 1
#define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 0
#define PS2_INT_INIT() do { \
EICRA |= ((1<<ISC11) | \
(0<<ISC10)); \
} while (0)
#define PS2_INT_ON() do { \
EIMSK |= (1<<INT1); \
} while (0)
#define PS2_INT_OFF() do { \
EIMSK &= ~(1<<INT1); \
} while (0)
#define PS2_INT_VECT INT1_vect
#endif
/*
* PS/2 USART
*/
#ifdef PS2_USE_USART
#if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
/* XCK for clock line and RXD for data line */
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 5
#define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 2
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
#define PS2_USART_INIT() do { \
PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
UCSR1C = ((1 << UMSEL10) | \
(3 << UPM10) | \
(0 << USBS1) | \
(3 << UCSZ10) | \
(0 << UCPOL1)); \
UCSR1A = 0; \
UBRR1H = 0; \
UBRR1L = 0; \
} while (0)
#define PS2_USART_RX_INT_ON() do { \
UCSR1B = ((1 << RXCIE1) | \
(1 << RXEN1)); \
} while (0)
#define PS2_USART_RX_POLL_ON() do { \
UCSR1B = (1 << RXEN1); \
} while (0)
#define PS2_USART_OFF() do { \
UCSR1C = 0; \
UCSR1B &= ~((1 << RXEN1) | \
(1 << TXEN1)); \
} while (0)
#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1))
#define PS2_USART_RX_DATA UDR1
#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1)))
#define PS2_USART_RX_VECT USART1_RX_vect
#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__)
/* XCK for clock line and RXD for data line */
#define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 4
#define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 0
/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */
/* set DDR of CLOCK as input to be slave */
#define PS2_USART_INIT() do { \
PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \
PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \
UCSR0C = ((1 << UMSEL00) | \
(3 << UPM00) | \
(0 << USBS0) | \
(3 << UCSZ00) | \
(0 << UCPOL0)); \
UCSR0A = 0; \
UBRR0H = 0; \
UBRR0L = 0; \
} while (0)
#define PS2_USART_RX_INT_ON() do { \
UCSR0B = ((1 << RXCIE0) | \
(1 << RXEN0)); \
} while (0)
#define PS2_USART_RX_POLL_ON() do { \
UCSR0B = (1 << RXEN0); \
} while (0)
#define PS2_USART_OFF() do { \
UCSR0C = 0; \
UCSR0B &= ~((1 << RXEN0) | \
(1 << TXEN0)); \
} while (0)
#define PS2_USART_RX_READY (UCSR0A & (1<<RXC0))
#define PS2_USART_RX_DATA UDR0
#define PS2_USART_ERROR (UCSR0A & ((1<<FE0) | (1<<DOR0) | (1<<UPE0)))
#define PS2_USART_RX_VECT USART_RX_vect
#endif
#endif
#endif
Your pin configuration is wrong. as config.h indicates, you have to use pd0/rxd and pd4/xck pin for atmega328p.
Post pic of your wiring.
Did you connect DATA to PD0 and Clock ot PD4? Do you have pull up resistors?
And do you have components(zeners and registers on INT0/INT1) for VUSB?
I haven't touched VUSB PS/2 converter for long time but just confirmed it still works from the latest source, glad.
Saw your pic, it seems like you don't have hardware for VUSB. Arduino nano is not compatible for VUSB you'll have to attach USB connector and resistors and zener diodes yourself.(EDIT: you cannot use Nano's USB connector for VUSB, it can be used only for programming flash.)
Do you know about what VUSB is or how it works, did you read VUSB docs or something? If you are not familir with VUSB you definitely need to read its doc or tutorial.
Yes, my post you quoted is still correct.
USB hardware of Nano is dedicated to doing serial communication, you cannot use it for other purpose, for example USB keyobard.
Hello Hasu,
(sorry for not reading the whole thread)
I intend to make such a converter using a "Pro Micro". My question is, in the 'converter/ps2_usb' folder, which is the "proper" Makefile to use? Or, is it enough if I change 'atmega32u2' to 'atmega32u4' in the main "Makefile"? And thanks (again) for creating TMK and all the features, and keyboards, and converters that it supports :)
No, current code doesn't support multiple instance of PS/2, but you can still use it as starting point.
i.e. TMK is not itself enough for your need but C/C++ can do anything you want :D
Do you have pic of the keyboard? Just curious.
You will have to write C code to handle those keys.
Sent from my Nexus 5X
Hi everyone. I have a noppoo choc mini and im using this adapter since its original controller (for usb use) is a complete mess because of its NKRO over usb implementation.
Thing is: My noppoo sometimes has a LOT of chatter and looking through the TMK_CORE files in github I saw that the base firmware has a debounce setting in it, but the PS2 converter has not (afaik). So, would be possible to add a debounce routine in this converter and if yes, how would one go about doing it? I can code reasonably well, but since my understanding of the tmk firmware is pretty much zero, I have no clue about where to start
What are the symptoms if we need pull up resistors & don't have them?
Hi everyone. I have a noppoo choc mini and im using this adapter since its original controller (for usb use) is a complete mess because of its NKRO over usb implementation.
Thing is: My noppoo sometimes has a LOT of chatter and looking through the TMK_CORE files in github I saw that the base firmware has a debounce setting in it, but the PS2 converter has not (afaik). So, would be possible to add a debounce routine in this converter and if yes, how would one go about doing it? I can code reasonably well, but since my understanding of the tmk firmware is pretty much zero, I have no clue about where to start
In genral converters don't have debouncer and keyboard should have it. I think you better repair your keyboard, probably by replacing switches? If it is not option you can implement debouncing in converter firmware. In matrix_scan() the converter keeps key states in matrix[] array according to key events from keyboard. You can place your logic in this function.
https://github.com/tmk/tmk_keyboard/blob/master/converter/ps2_usb/matrix.c#L144-L383
Hey Hasu, the USB-to-USB converter has a limited memory, does this converter have that limitation or it can store more layers? How much memory does it have?
In file included from keymap_plain.c:1:0:
keymap_common.h:131:17: error: 'KC_K19' undeclared here (not in a function); did you mean 'KC_F19'?
{ KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_NO }, \
^
keymap_common.h:171:1: note: in expansion of macro 'KEYMAP_ALL'
KEYMAP_ALL( \
^~~~~~~~~~
keymap_common.h:196:1: note: in expansion of macro 'KEYMAP_FULL'
KEYMAP_FULL( \
^~~~~~~~~~~
keymap_plain.c:21:5: note: in expansion of macro 'KEYMAP'
KEYMAP(
^~~~~~
Hello Hasu,
Trying to use an ISO modded F AT with the PS/2 converter, the modded keys send some unassigned codes. I tried merely adding the codes to the KEYMAP_ALL macros but this commit (4be3562 (https://github.com/louisrousseau/tmk_keyboard/commit/4be356231c22c6b614cd199418e41e17a335a162)) leads to build errors:Code: [Select]In file included from keymap_plain.c:1:0:
keymap_common.h:131:17: error: 'KC_K19' undeclared here (not in a function); did you mean 'KC_F19'?
{ KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_NO }, \
^
keymap_common.h:171:1: note: in expansion of macro 'KEYMAP_ALL'
KEYMAP_ALL( \
^~~~~~~~~~
keymap_common.h:196:1: note: in expansion of macro 'KEYMAP_FULL'
KEYMAP_FULL( \
^~~~~~~~~~~
keymap_plain.c:21:5: note: in expansion of macro 'KEYMAP'
KEYMAP(
^~~~~~
And so on. I tried searching for the declaration of existing codes to no avail, with all the preprocessor business going on, not sure what to look for either.
Help?
Thanks,
Darkshado
https://imgur.com/a/gglWr
I'm trying to make the adapter work with my BTC 5100C. This is my first time of doing this and I don't know where to start. When I plugged the keyboard in, it wasn't even recognized. Would anyone have any experience on this?
https://imgur.com/a/gglWr
I'm trying to make the adapter work with my BTC 5100C. This is my first time of doing this and I don't know where to start. When I plugged the keyboard in, it wasn't even recognized. Would anyone have any experience on this?
1) FIrst, without keyboard check your converter is recogized with device manager if you are on windows, use proper command or see log file if you are on Linux or something. It should have feed:6512 as USB VID:PID.Show Image(https://i.imgur.com/G3BcsID.png)
1a) This is optional. Push button to put the converter into flash mode. You should see 03eb:2ff0 as VID:PID. Refer this If you need to install driver to flash new firmware. https://github.com/tmk/tmk_keyboard/wiki/Driver-install-on-Windows
2) plug-in the keyboard. The converter should work with PS/2 keyboard now.
If not flash default firmware downloaded from here. Don't edit keymap here.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?ps2_usb
EDIT: oh, make sure that your USB cable has good quality enough first before that.
Thanks for the help!
With that I'm now able to get by board recognized and I could type now. Next, I would like to remap some of my keys, could you let me know how to do it?https://imgur.com/a/gglWr
I'm trying to make the adapter work with my BTC 5100C. This is my first time of doing this and I don't know where to start. When I plugged the keyboard in, it wasn't even recognized. Would anyone have any experience on this?
1) FIrst, without keyboard check your converter is recogized with device manager if you are on windows, use proper command or see log file if you are on Linux or something. It should have feed:6512 as USB VID:PID.Show Image(https://i.imgur.com/G3BcsID.png)
1a) This is optional. Push button to put the converter into flash mode. You should see 03eb:2ff0 as VID:PID. Refer this If you need to install driver to flash new firmware. https://github.com/tmk/tmk_keyboard/wiki/Driver-install-on-Windows
2) plug-in the keyboard. The converter should work with PS/2 keyboard now.
If not flash default firmware downloaded from here. Don't edit keymap here.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?ps2_usb
EDIT: oh, make sure that your USB cable has good quality enough first before that.
What did you do to recognized you keyboard actually?
And what do you think your problem was?
Refer this for remap.
https://github.com/tmk/tmk_keyboard/wikiThanks for the help!
With that I'm now able to get by board recognized and I could type now. Next, I would like to remap some of my keys, could you let me know how to do it?https://imgur.com/a/gglWr
I'm trying to make the adapter work with my BTC 5100C. This is my first time of doing this and I don't know where to start. When I plugged the keyboard in, it wasn't even recognized. Would anyone have any experience on this?
1) FIrst, without keyboard check your converter is recogized with device manager if you are on windows, use proper command or see log file if you are on Linux or something. It should have feed:6512 as USB VID:PID.Show Image(https://i.imgur.com/G3BcsID.png)
1a) This is optional. Push button to put the converter into flash mode. You should see 03eb:2ff0 as VID:PID. Refer this If you need to install driver to flash new firmware. https://github.com/tmk/tmk_keyboard/wiki/Driver-install-on-Windows
2) plug-in the keyboard. The converter should work with PS/2 keyboard now.
If not flash default firmware downloaded from here. Don't edit keymap here.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?ps2_usb
EDIT: oh, make sure that your USB cable has good quality enough first before that.
I was using the front USB port of my computer and the keyboard was not recognized. Then I tried the back USB port and it worked immediately. Refer to this picture (https://imgur.com/a/flaZs)
Per the remap wiki, I understand that I have to remap my key with this editor (http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?ps2_usb)
However, this is my keyboard layout (https://ssli.ebayimg.com/images/g/XiUAAOSws5pZJ1uq/s-l1600.jpg). How can I use your editor to remap this layout?
Ah, OK.
matrix_scan() is called as frequently as possible in infinite loop in main() regardless of PS/2 keyboard signal interrupt.
The "extra buttons" code is here, in case anybody is interested: https://github.com/VanLaser/tmk_keyboard/commit/d359581e87d2a2b64f62858ba33a6b5efb3e2cc8
It uses buttons PD4 (nr. 4 on Pro Micro) and PD7 (nr. 6 on Pro Micro). Debouncing is based on the TMK 'onekey' keyboard code. I haven't tested with an actual PS2 keyboard connected, yet, just with buttons, so the "laser" keymap may still have mapping errors (but the buttons do work).
With the testbed below, I use just one switch to trigger both "extra buttons" pins; the 2nd switch is used to reset the Pro Micro.
(Attachment Link)
A question (sorry if asked before): if a USB keyboard comes with a passive PS/2 converter, does it mean that it could use your "PS/2 to USB" converter instead of the more expensive USB2USB converter? I read somewhere that "PS2 host to USB device adapters are passive and just convert the connector. They require the keyboard or Mouse to support both protocols and automatically detect which to use." My idea would be to hook up the pins from the PCB connector that normally go to the USB jack to the PS/2 part of the PS/2-to-USB converter. Would that work? (the keyboard would detect that it's in the PS/2 mode)
While in the end the connection is still USB, the purpose is of course that of making the keyboard fully programmable with TMK, using the cheaper to buy/make PS/2-to-USB converter.
Alright, I think I'm missing something or I did something wrong. I've got a Dell AT101W PS/2 board that I'm wiring up a Teensy 2.0 with the default TMK PS2-USB Converter Rev.1 firmware.
I've got Vcc connected to +5v, GND connected to ground, PD0 connected to Data, and PD1 connected to Clock.
When I connect the USB connector to it, all the LEDs light up for like half a second and then they all go off. After that the teensy shows in device manager as a keyboard, but nothing on the keyboard works.
Do I have the lines backwards or am I using the wrong firmware or something? I tried putting a 4.7k resistor on the data and clock lines connecting to Vcc but still nothing.
Any ideas would be greatly appreciated.
include $(TMK_DIR)/protocol.mk
include $(TMK_DIR)/protocol/lufa.mk
include $(TMK_DIR)/common.mk
include $(TMK_DIR)/rules.mk
)avr-gcc (Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mkdir -p obj_ps2_usb/protocol/lufa
Compiling C: ../../tmk_core/protocol/lufa/lufa.c
avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DSUSPEND_MODE_STANDBY -DBOOTLOADER_SIZE=4096 -DPS2_USE_INT -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DNO_LIMITED_CONTROLLER_CONNECT -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DNKRO_ENABLE -DVERSION=494faeb4-dirty -Os -funsigned-char -funsigned-bitfields -ffunction-s
ections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_ps2_usb/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_ps2_usb_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_ps2_usb/protocol/lufa/lufa.o
In file included from ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/../../Common/Common.h:96:0,
from ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/USB.h:382,
from ../../tmk_core/protocol/lufa/descriptor.h:47,
from ../../tmk_core/common/report.h:83,
from ../../tmk_core/protocol/lufa/lufa.c:39:
../../tmk_core/protocol/lufa/lufa.c: In function 'EVENT_USB_Device_Connect':
../../tmk_core/common/avr/pgmspace.h:249:46: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
# define PSTR(s) (__extension__({static char __c[] PROGMEM = (s); &__c[0];}))
^
../../tmk_core/common/print.h:41:27: note: in expansion of macro 'PSTR'
#define print(s) xputs(PSTR(s))
^~~~
../../tmk_core/protocol/lufa/lufa.c:221:5: note: in expansion of macro 'print'
print("[C]");
^~~~~
../../tmk_core/protocol/lufa/lufa.c: In function 'EVENT_USB_Device_Disconnect':
../../tmk_core/common/avr/pgmspace.h:249:46: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
# define PSTR(s) (__extension__({static char __c[] PROGMEM = (s); &__c[0];}))
^
../../tmk_core/common/print.h:41:27: note: in expansion of macro 'PSTR'
#define print(s) xputs(PSTR(s))
^~~~
../../tmk_core/protocol/lufa/lufa.c:232:5: note: in expansion of macro 'print'
print("[D]");
^~~~~
../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu':
../../tmk_core/protocol/lufa/lufa.c:609:5: warning: implicit declaration of function 'clock_prescale_set' [-Wimplicit-function-declaration]
clock_prescale_set(clock_div_1);
^~~~~~~~~~~~~~~~~~
../../tmk_core/protocol/lufa/lufa.c:609:24: error: 'clock_div_1' undeclared (first use in this function)
clock_prescale_set(clock_div_1);
^~~~~~~~~~~
../../tmk_core/protocol/lufa/lufa.c:609:24: note: each undeclared identifier is reported only once for each function it appears in
In file included from ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/../../Common/Common.h:96:0,
from ../../tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/USB/USB.h:382,
from ../../tmk_core/protocol/lufa/descriptor.h:47,
from ../../tmk_core/common/report.h:83,
from ../../tmk_core/protocol/lufa/lufa.c:39:
../../tmk_core/protocol/lufa/lufa.c: In function 'main':
JosefM,
See this wiki entry.
https://github.com/tmk/tmk_keyboard/wiki#build-firmware
MCU ?= atmega32u2
in the Makefile. UsingMCU ?= at90usb1286
(the MCU on the Teensy 2.0++) it wasn't working.#if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega32U2__) || defined(__AVR_AT90USB1286__)
MCU ?= at90usb1286
BOOTLOADER_SIZE ?= 1024
CONSOLE_ENABLE ?= no # Console for debug(+400)
Why so many input devices?
Why so many input devices?
They are used for NKRO, mouse emulation and media keys.
I have a model M13 keyboard, and an Alps Glidepoint keyboard. They have two PS/2 connectors, one for the trackpoint, and one for the keyboard. They work well with a simple glop-top active converter, but I like being able to program things/remap keys in a device-independent way.
I ran around in circles for a bit, then realized TMK supports ps/2 mice. I built a PS2_USE_INT PS2_MOUSE_ENABLE version, and it works, although it seems to stutter a bit.
I poked about trying to get PS2_USE_USART to work, read that the useful pins are limited - PD5 is an LED on a Pro Micro, which is what I'm working on right now - and thought I'd ask:
Is USART limited to just PD5 & PD2?
is a 32u4 fast enough to convert PS/2 keyboard and mouse on the same chip?
And renaming PS2_DATA_BIT & PS2_CLOCK_BIT for the second set of pins looks like it should work.
Interesting.
Did you get any dialog or something on your OS?
I'd try some to know where the issue is located in keyobard, converter and firmware.
0) Plugin the converter without keyboard and see if you still have same issue.
1) Try Soarer's firmware and see if you still have same issue with it.
2) If you have other PS/2 keyboard and check the converter itself works well.
.MaxPowerConsumption = USB_CONFIG_POWER_MA(250)
and now it seems to be working 100% successfully.Apr 26 12:26:06 raspberrypi kernel: [ 2189.778392] usb 1-1.1.2: new full-speed USB device number 23 using dwc_otg
Apr 26 12:26:19 raspberrypi kernel: [ 2202.538520] usb 1-1.1.2: device not accepting address 23, error -110
Apr 26 12:26:19 raspberrypi kernel: [ 2202.638558] usb 1-1.1.2: new full-speed USB device number 24 using dwc_otg
Apr 26 12:26:34 raspberrypi kernel: [ 2217.858672] usb 1-1.1.2: device descriptor read/64, error -110
Apr 26 12:27:04 raspberrypi kernel: [ 2247.898952] usb 1-1.1.2: new full-speed USB device number 25 using dwc_otg
Apr 26 12:27:16 raspberrypi kernel: [ 2259.719067] usb 1-1.1.2: device not accepting address 25, error -32
Apr 26 12:27:19 raspberrypi kernel: [ 2263.249090] usb 1-1.1.2: new full-speed USB device number 27 using dwc_otg
Apr 26 12:27:32 raspberrypi kernel: [ 2275.899225] usb 1-1.1.2: device not accepting address 27, error -110
Apr 26 12:27:34 raspberrypi kernel: [ 2278.099227] usb 1-1.1.2: new full-speed USB device number 29 using dwc_otg
Apr 26 12:27:37 raspberrypi kernel: [ 2280.439471] usb 1-1.1.2: New USB device found, idVendor=feed, idProduct=6512
Apr 26 12:27:37 raspberrypi kernel: [ 2280.439487] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr 26 12:27:37 raspberrypi kernel: [ 2280.439496] usb 1-1.1.2: Product: ChopperHello PS/2
Apr 26 12:27:37 raspberrypi kernel: [ 2280.439505] usb 1-1.1.2: Manufacturer: ChopperHello
Apr 26 12:27:37 raspberrypi kernel: [ 2280.448655] input: ChopperHello ChopperHello PS/2 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:FEED:6512.0011/input/input12
Apr 26 12:27:37 raspberrypi kernel: [ 2280.510324] hid-generic 0003:FEED:6512.0011: input,hidraw0: USB HID v1.11 Keyboard [ChopperHello ChopperHello PS/2] on usb-3f980000.usb-1.1.2/input0
Apr 26 12:27:37 raspberrypi kernel: [ 2280.517544] input: ChopperHello ChopperHello PS/2 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.1/0003:FEED:6512.0012/input/input13
Apr 26 12:27:37 raspberrypi kernel: [ 2280.579700] hid-generic 0003:FEED:6512.0012: input,hidraw1: USB HID v1.11 Device [ChopperHello ChopperHello PS/2] on usb-3f980000.usb-1.1.2/input1
Apr 26 12:27:37 raspberrypi kernel: [ 2280.586355] hid-generic 0003:FEED:6512.0013: hiddev96,hidraw2: USB HID v1.11 Device [ChopperHello ChopperHello PS/2] on usb-3f980000.usb-1.1.2/input2
Apr 26 12:27:37 raspberrypi kernel: [ 2280.594378] input: ChopperHello ChopperHello PS/2 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.3/0003:FEED:6512.0014/input/input14
Apr 26 12:27:37 raspberrypi kernel: [ 2280.660397] hid-generic 0003:FEED:6512.0014: input,hidraw3: USB HID v1.11 Keyboard [ChopperHello ChopperHello PS/2] on usb-3f980000.usb-1.1.2/input3
default 12:17:03.895474 -0700 kernel 013333.717355 IOUSBHostDevice@fd130000: IOUSBHostDevice::start: device descriptor request completed with 0xe0005000 and bytesTransferred 0
default 12:17:03.895729 -0700 kernel 013333.717609 AppleUSB20HubPort@fd130000: AppleUSB20HubPort::resetAndCreateDevice: failed to start device
default 12:17:03.895795 -0700 kernel 013333.717674 AppleUSB20HubPort@fd130000: AppleUSB20HubPort::resetAndCreateDevice: failed to create device (0xe00002e9), disabling port
default 12:17:21.810753 -0700 kernel 013351.632159 AppleUSB20HubPort@fd130000: AppleUSB20HubPort::interruptOccurred: change bits still set, port status 0x00000100
default 12:17:25.048644 -0700 kernel 013354.869965 AppleUSB20HubPort@fd130000: AppleUSBHostPort::disconnect: persistent enumeration failures
default 12:17:28.793433 -0700 kernel 013358.614651 AppleUSB20HubPort@fd130000: AppleUSBHostPort::disconnect: persistent enumeration failures
default 12:17:31.914748 -0700 kernel 013361.735890 AppleUSB20HubPort@fd130000: AppleUSBHostPort::disconnect: persistent enumeration failures
default 12:17:32.101275 -0700 kernel 013361.922412 AppleUSB20HubPort@fd130000: AppleUSBHostPort::disconnect: persistent enumeration failures
default 12:17:50.793640 -0700 kernel 013380.614281 AppleUSB20HubPort@fd130000: AppleUSBHostPort::disconnect: persistent enumeration failures
default 12:18:00.775158 -0700 kernel 013390.595528 AppleUSB20HubPort@fd130000: AppleUSB20HubPort::interruptOccurred: change bits still set, port status 0x00000100
default 12:18:01.170828 -0700 kernel 013390.991189 AppleUSB20HubPort@fd130000: AppleUSBHostPort::disconnect: persistent enumeration failures
default 12:18:02.790473 -0700 kernel 013392.610797 AppleUSB20HubPort@fd130000: AppleUSBHostPort::disconnect: persistent enumeration failures
default 12:18:14.407379 -0700 kernel 013404.227393 AppleUSB20HubPort@fd130000: AppleUSB20HubPort::interruptOccurred: change bits still set, port status 0x00000100
default 12:18:16.127062 -0700 kernel 013405.947034 AppleUSB20HubPort@fd130000: AppleUSBHostPort::disconnect: persistent enumeration failures
Hasu -
Just tested your updated ps2_usb with Makefile.32u4. Works beautifully. Thanks again for all your help!
-----------------------
Okay so I'm trying to make my own layouts and I'm pretty confused by the ps2 scan codes. I found this reference manual (https://babbage.cs.qc.cuny.edu/courses/cs345/Manuals/ms_scancode.pdf), which mostly makes sense with regards to the scan codes, but I'm confused by it in a few places.
For example, "Print Screen" seems to correspond to the code "E012E07C", or "Up Arrow" is "E075". On the other hand, in "keymap_common.h" in ps2_usb, it appears that "Print Screen" corresponds to "FC" and "Up Arrow" to "F5".
Would you mind giving me a brief explanation of what you did here? I'm a little confused. I know I don't strictly need to know this information to accomplish what I'm trying to, but I'm still curious.
Thanks Hasu.
Hasu -
I'm trying to make it so that I can press a button (or a combination of buttons) to reset the pro micro/enter bootloader. I tried both mapping a key to KC_BOOTLOADER and RSHIFT+LSHIFT+PAUSE, and both exhibit the same behavior - after a moment the keyboard disconnects then reconnects, and I haven't succesfully been able to use this method to flash the pro micro. I've had to press a physical button wired into the GND and RESET pins of the pro micro.
As a note, I use the RSHIFT+LSHIFT+PAUSE method to enter the bootloader on my Zenith, which uses the xt_usb converter, and that works fine. Any ideas about how to fix this problem?
Thanks!
Did you check if your keyboard can recoginze the keycombo?
Some of PS/2 keyboards can fail especially if it is old without diodes.
/* Jumping To The Bootloader
* http://www.pjrc.com/teensy/jump_to_bootloader.html
*
* This method doen't work when using LUFA. idk why.
* - needs to initialize more regisers or interrupt setting?
*/
Did you check if your keyboard can recoginze the keycombo?
Some of PS/2 keyboards can fail especially if it is old without diodes.
So I think one of the keyboards (BSR) doesn't have NKRO and so I can't actually press RSHIFT+LSHIFT+PAUS simultaneously. For this keyboard, I tried mapping a macro to RSHIFT+LSHIFTT+PAUS, but that didn't seem to work at all. Not sure why.
The other keyboard, the RT101+, has diodes and so I can actually simultaneously press RSHIFT+LSHIFT+PAUS. I get the keyboard disconnected "ding" from windows, but then just a few seconds later (maybe exactly two, going off the 2000ms delay specified in bootloader.c), I get the "reconnected" ding. I can't tell if it's actually entering the bootloader during that time, as I haven't so far been able to use this method to flash the pro micro.
in tmk_keyboard/tmk_core/common/avr/bootloader.c, I just tried setting '_delay_ms' to 10000 (10s) for both PROTOCOL_LUFA and PROTOCOL_PJRC. This certainly changed how long the keyboard went disconnected for, but it still doesn't seem to be entering the bootloader. At any rate, I'm unable to flash to it within the period between when it disconnects and reconnects, during which it presumably should be in bootloader.
I noticed in bootloader.c the following commentCode: [Select]/* Jumping To The Bootloader
* http://www.pjrc.com/teensy/jump_to_bootloader.html
*
* This method doen't work when using LUFA. idk why.
* - needs to initialize more regisers or interrupt setting?
*/
Maybe xt_usb is using pjrc and ps2_usb is using LUFA? I really have no idea what any of that means I'm just guessing here, but I don't know how to find out either. Or how to fix the problem, of course.
How did you define your keymap? Post your keymap.
I don't think it is very easy to emulate the keycombo in keymapping.
#include "keymap_common.h"
// KC_BOOTLOADER should put the keyboard into bootloader mode, but it seems to put it in for like a second then take it out.
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: default
* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
* `---' `---------------' `---------------' `---------------' `-----------'
* ,-----------------------------------------------------------. ,-----------. ,---------------.
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS | |Ins|Hom|PgU| |NmL| /| *| -|
* |-----------------------------------------------------------| |-----------| |---------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| |
* |-----------------------------------------------------------| `-----------' |-----------| +|
* |CapsL | A| S| D| F| G| H| J| K| L| ;| '| Ent | | 4| 5| 6| |
* |-----------------------------------------------------------| ,---. |---------------|
* |Shft| <| Z| X| C| V| B| N| M| ,| .| /| Shift | |Up | | 1| 2| 3| |
* |-----------------------------------------------------------| ,-----------. |-----------|Ent|
* | CTRL| | ALT| SPACE | ALT| | CTRL| |Lef|Dow|Rig| | 0| .| |
* `-----------------------------------------------------------' `-----------' `---------------'
*/
// KEYMAP_IBM_AT(
// ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK,
// GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
// TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, PPLS,
// CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6,
// LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, PENT,
// LCTL, LALT, SPC, RALT, RCTL, LEFT,DOWN,RGHT, P0, PDOT
// ),
KEYMAP_IBM_AT(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS,
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, PPLS,
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6,
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, PENT,
LCTL, LALT, SPC, RALT, RCTL, LEFT,DOWN,RGHT, P0, PDOT
),
};
enum macro_id {
RESET,
};
const action_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_TOGGLE(1), // FN0
[1] = ACTION_LAYER_MOMENTARY(2), // FN1
[2] = ACTION_MACRO(RESET),
};
/*
* Macro definition
*/
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch (id) {
case RESET:
return (record->event.pressed ?
MACRO( T(LSFT), T(RSFT), T(PAUS), END ) :
MACRO_NONE);
}
return MACRO_NONE;
}
That indicates the firmware does what it is expected.
You are on Windows? Why don't you check what happens with device manager? You will see something change on that.
If you are on Linux you can check it easily by seeing log like /var/log/kern.log.
7445a7446,7480
> Sep 14 19:34:09 SilverServer kernel: [ 216.248715] usb 1-1.4: new full-speed USB device number 3 using ehci-pci
> Sep 14 19:34:09 SilverServer kernel: [ 216.358766] usb 1-1.4: New USB device found, idVendor=feed, idProduct=6512, bcdDevice= 0.01
> Sep 14 19:34:09 SilverServer kernel: [ 216.358769] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> Sep 14 19:34:09 SilverServer kernel: [ 216.358771] usb 1-1.4: Product: PS/2 keyboard converter
> Sep 14 19:34:09 SilverServer kernel: [ 216.358773] usb 1-1.4: Manufacturer: t.m.k.
> Sep 14 19:34:09 SilverServer kernel: [ 216.378003] hidraw: raw HID events driver (C) Jiri Kosina
> Sep 14 19:34:09 SilverServer kernel: [ 216.384743] usbcore: registered new interface driver usbhid
> Sep 14 19:34:09 SilverServer kernel: [ 216.384744] usbhid: USB HID core driver
> Sep 14 19:34:09 SilverServer kernel: [ 216.392101] input: t.m.k. PS/2 keyboard converter as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:FEED:6512.0001/input/input10
> Sep 14 19:34:09 SilverServer kernel: [ 216.448963] hid-generic 0003:FEED:6512.0001: input,hidraw0: USB HID v1.11 Keyboard [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input0
> Sep 14 19:34:09 SilverServer kernel: [ 216.449154] input: t.m.k. PS/2 keyboard converter as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:FEED:6512.0002/input/input11
> Sep 14 19:34:09 SilverServer kernel: [ 216.509043] hid-generic 0003:FEED:6512.0002: input,hidraw1: USB HID v1.11 Mouse [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input1
> Sep 14 19:34:09 SilverServer kernel: [ 216.509301] input: t.m.k. PS/2 keyboard converter System Control as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:FEED:6512.0003/input/input12
> Sep 14 19:34:09 SilverServer kernel: [ 216.568920] input: t.m.k. PS/2 keyboard converter Consumer Control as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:FEED:6512.0003/input/input13
> Sep 14 19:34:09 SilverServer kernel: [ 216.569176] hid-generic 0003:FEED:6512.0003: input,hidraw2: USB HID v1.11 Device [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input2
> Sep 14 19:34:09 SilverServer kernel: [ 216.569460] hid-generic 0003:FEED:6512.0004: hiddev0,hidraw3: USB HID v1.11 Device [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input3
> Sep 14 19:34:09 SilverServer kernel: [ 216.569641] input: t.m.k. PS/2 keyboard converter as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.4/0003:FEED:6512.0005/input/input14
> Sep 14 19:34:10 SilverServer kernel: [ 216.628980] hid-generic 0003:FEED:6512.0005: input,hidraw4: USB HID v1.11 Keyboard [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input4
> Sep 14 19:34:14 SilverServer kernel: [ 221.234337] usb 1-1.4: USB disconnect, device number 3
> Sep 14 19:34:25 SilverServer kernel: [ 231.620737] usb 1-1.4: new full-speed USB device number 4 using ehci-pci
> Sep 14 19:34:25 SilverServer kernel: [ 231.730621] usb 1-1.4: New USB device found, idVendor=feed, idProduct=6512, bcdDevice= 0.01
> Sep 14 19:34:25 SilverServer kernel: [ 231.730624] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> Sep 14 19:34:25 SilverServer kernel: [ 231.730626] usb 1-1.4: Product: PS/2 keyboard converter
> Sep 14 19:34:25 SilverServer kernel: [ 231.730627] usb 1-1.4: Manufacturer: t.m.k.
> Sep 14 19:34:25 SilverServer kernel: [ 231.732091] input: t.m.k. PS/2 keyboard converter as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:FEED:6512.0006/input/input15
> Sep 14 19:34:25 SilverServer kernel: [ 231.789134] hid-generic 0003:FEED:6512.0006: input,hidraw0: USB HID v1.11 Keyboard [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input0
> Sep 14 19:34:25 SilverServer kernel: [ 231.790295] input: t.m.k. PS/2 keyboard converter as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:FEED:6512.0007/input/input16
> Sep 14 19:34:25 SilverServer kernel: [ 231.849023] hid-generic 0003:FEED:6512.0007: input,hidraw1: USB HID v1.11 Mouse [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input1
> Sep 14 19:34:25 SilverServer kernel: [ 231.850088] input: t.m.k. PS/2 keyboard converter System Control as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:FEED:6512.0008/input/input17
> Sep 14 19:34:25 SilverServer kernel: [ 231.908939] input: t.m.k. PS/2 keyboard converter Consumer Control as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:FEED:6512.0008/input/input18
> Sep 14 19:34:25 SilverServer kernel: [ 231.909193] hid-generic 0003:FEED:6512.0008: input,hidraw2: USB HID v1.11 Device [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input2
> Sep 14 19:34:25 SilverServer kernel: [ 231.910258] hid-generic 0003:FEED:6512.0009: hiddev0,hidraw3: USB HID v1.11 Device [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input3
> Sep 14 19:34:25 SilverServer kernel: [ 231.911226] input: t.m.k. PS/2 keyboard converter as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.4/0003:FEED:6512.000A/input/input19
> Sep 14 19:34:25 SilverServer kernel: [ 231.969145] hid-generic 0003:FEED:6512.000A: input,hidraw4: USB HID v1.11 Keyboard [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input4
> Sep 14 19:34:36 SilverServer kernel: [ 243.419667] usb 1-1.4: USB disconnect, device number 4
7496a7497,7522
> Sep 14 19:39:09 SilverServer kernel: [ 515.741535] usb 1-1.4: new full-speed USB device number 6 using ehci-pci
> Sep 14 19:39:58 SilverServer kernel: [ 564.921669] usb 1-1.4: new full-speed USB device number 7 using ehci-pci
> Sep 14 19:39:58 SilverServer kernel: [ 565.031119] usb 1-1.4: New USB device found, idVendor=2341, idProduct=0036, bcdDevice= 0.01
> Sep 14 19:39:58 SilverServer kernel: [ 565.031123] usb 1-1.4: New USB device strings: Mfr=2, Product=1, SerialNumber=0
> Sep 14 19:39:58 SilverServer kernel: [ 565.031124] usb 1-1.4: Product: Arduino Leonardo
> Sep 14 19:39:58 SilverServer kernel: [ 565.031126] usb 1-1.4: Manufacturer: Arduino LLC
> Sep 14 19:39:58 SilverServer kernel: [ 565.043666] cdc_acm 1-1.4:1.0: ttyACM0: USB ACM device
> Sep 14 19:39:58 SilverServer kernel: [ 565.044044] usbcore: registered new interface driver cdc_acm
> Sep 14 19:39:58 SilverServer kernel: [ 565.044044] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
> Sep 14 19:40:06 SilverServer kernel: [ 572.736657] usb 1-1.4: USB disconnect, device number 7
> Sep 14 19:40:06 SilverServer kernel: [ 572.969688] usb 1-1.4: new full-speed USB device number 8 using ehci-pci
> Sep 14 19:40:06 SilverServer kernel: [ 573.079438] usb 1-1.4: New USB device found, idVendor=feed, idProduct=6512, bcdDevice= 0.01
> Sep 14 19:40:06 SilverServer kernel: [ 573.079441] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> Sep 14 19:40:06 SilverServer kernel: [ 573.079443] usb 1-1.4: Product: PS/2 keyboard converter
> Sep 14 19:40:06 SilverServer kernel: [ 573.079445] usb 1-1.4: Manufacturer: t.m.k.
> Sep 14 19:40:06 SilverServer kernel: [ 573.080919] input: t.m.k. PS/2 keyboard converter as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:FEED:6512.0010/input/input25
> Sep 14 19:40:06 SilverServer kernel: [ 573.138090] hid-generic 0003:FEED:6512.0010: input,hidraw0: USB HID v1.11 Keyboard [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input0
> Sep 14 19:40:06 SilverServer kernel: [ 573.139229] input: t.m.k. PS/2 keyboard converter as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:FEED:6512.0011/input/input26
> Sep 14 19:40:06 SilverServer kernel: [ 573.197981] hid-generic 0003:FEED:6512.0011: input,hidraw1: USB HID v1.11 Mouse [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input1
> Sep 14 19:40:06 SilverServer kernel: [ 573.199025] input: t.m.k. PS/2 keyboard converter System Control as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:FEED:6512.0012/input/input27
> Sep 14 19:40:06 SilverServer kernel: [ 573.257893] input: t.m.k. PS/2 keyboard converter Consumer Control as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:FEED:6512.0012/input/input28
> Sep 14 19:40:06 SilverServer kernel: [ 573.258144] hid-generic 0003:FEED:6512.0012: input,hidraw2: USB HID v1.11 Device [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input2
> Sep 14 19:40:06 SilverServer kernel: [ 573.259212] hid-generic 0003:FEED:6512.0013: hiddev0,hidraw3: USB HID v1.11 Device [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input3
> Sep 14 19:40:06 SilverServer kernel: [ 573.260386] input: t.m.k. PS/2 keyboard converter as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.4/0003:FEED:6512.0014/input/input29
> Sep 14 19:40:06 SilverServer kernel: [ 573.318085] hid-generic 0003:FEED:6512.0014: input,hidraw4: USB HID v1.11 Keyboard [t.m.k. PS/2 keyboard converter] on usb-0000:00:1a.0-1.4/input4
> Sep 14 19:40:11 SilverServer kernel: [ 578.112654] usb 1-1.4: USB disconnect, device number 8
Your keymap is lagacy now and the latest firmware for PS/2 converter doesn't lagacy keymap anymore by default, you have to use unimap instead. You have to comment out UNIMAP_ENABLE=yes and KEYMAP_SCTION_ENABLE=yes lines in Makefile.32u4 to enable the lagacy keymap. And T() macro means 'type', not hold so it won't work for modifiers if I remember it correctly.
I like to see /var/log/kern.log
1) when entering bootloader of XT converter by pressing the keycombo
2) when entering bootloader of XT converter by using RST pin
EDIT: And I found this issue in TMK repo. Probably you have to set 'bootkey' before jump(reset) bootloader.
https://github.com/tmk/tmk_keyboard/issues/256
I like to see /var/log/kern.log
1) when entering bootloader of XT converter by pressing the keycombo
2) when entering bootloader of XT converter by using RST pin
Great.
I also have no idea why xt_usb conveter works with the bootlader. /var/log/kern.log would be helpful probably as I said.QuoteI like to see /var/log/kern.log
1) when entering bootloader of XT converter by pressing the keycombo
2) when entering bootloader of XT converter by using RST pin
How did you build firmware for your xt_usb converter? it is really TMK, or QMK?
Hasu,
I just converted a Northgate Omnikey 102 from PS2 (scan code set 2) to USB, and I'm having an issue. Specifically, When plugging the keyboard in, I get the "device connected" chime, immediately followed by the "device disconnected chime," and the two back LEDs on the pro-micro go red and nothing works.
Note that this doesn't happen every single time, sometimes I'll plug it in and everything will work normally, or I can also get it working by resetting the pro micro a bunch of times.
Actually, testing this some more just now, it seems like the only way to reliably get it working is reset the pro micro (at least once, sometimes more) by bridging the GND and RST pins.
I believe I'm having the same issue on another ps2-usb conversion I did on an RT101+, I think the behavior is the same.
Hasu,
I've got some updates for you. Forgive me for not having gotten to try everything you suggested, but I do have some findings.
- I tried converting this board with a teensy, and, indeed, it works fine. No weird issues at all.
- I figured out a consistent, though hacky, way to get the pro micro to work. Steps are:
- Plug in pro micro (keyboard does not work at this point).
- Reset pro micro (bridge GND and RST)
- Wait a little bit (I'm guessing for wait for the pro-micro to automatically exit bootloader mode)
- ->Keyboard works
- So, once again I guess, is there some adjustment that can be made to the firmware to automatically do this? Like recognize that it's a pro-micro I guess, then send the appropriate signals to it so that you don't have to do it manually?
I do actually wonder - if you could just put a different bootloader on it, would that work? I'll have to try that one.
Let me know your thoughts. Thanks Hasu.
EDIT:
PancakeMSTR, Could you try this new converter on your Zenith, Omnikey and RT101+ and report the result on its thread? It would be helpful to improve the converter firmware code. The converter supports AT,XT and Terminal with one firmware like soarer's
https://geekhack.org/index.php?topic=103648.0
I guess power voltage causes if the issue happens on specific keyboards.
You did solder bridge on J1?
EDIT:
PancakeMSTR, Could you try this new converter on your Zenith, Omnikey and RT101+ and report the result on its thread? It would be helpful to improve the converter firmware code. The converter supports AT,XT and Terminal with one firmware like soarer's
https://geekhack.org/index.php?topic=103648.0
I guess power voltage causes if the issue happens on specific keyboards.
You did solder bridge on J1?
Lol. J1 was not solder bridged, but I just bridged it myself and the keyboard now works perfectly. That was clearly the problem. Welp, at least there was a really easy solution this time!!
EDIT:
PancakeMSTR, Could you try this new converter on your Zenith, Omnikey and RT101+ and report the result on its thread? It would be helpful to improve the converter firmware code. The converter supports AT,XT and Terminal with one firmware like soarer's
https://geekhack.org/index.php?topic=103648.0
I'd be delighted. I'll report back with results when I get a chance to test it.
Thanks as usual Hasu!
Hi Hasu,
So, strangely, I tried that same trick - solder jumping J1 - with my RT101+ that is behaving identically to how the Omnikey was, but it didn't work :(
Still the same behavior with the RT101+ (have to reset the pro micro to get the keyboard to connect properly). So I dunno, that's a weird one. Gonna have to look into other options for it.
Waiting for new device:....
Listening:
TMK:23305ad9/LUFA
And I tested your IBM PC converter on the Omnikey. I replied in the corresponding thread, but, long story short, it seems to be working pretty well but for some minor weirdness.
How would one use this converter with the Cherry G80-11800 keyboard? It has a single cable that splits into two PS/2 connectors, one for keyboard and the other for the trackball. Any way to get both working with this converter?If normal keyboard and mouse function are sufficient, you may get good enough results with a normal active ps/2 to usb converter cable. They usually come with two ps/2 inputs and one usb output and are pretty easy to use and relatively cheap. If you're not using an US keyboard, make sure that the converter supports the extra key.
As long as I remember V-USB works well when PS/2 singnal is handled by hardware USART of AVR.Thank you! That is very helpful. Most projects regarding V-USB just implement a small, partial keyboard or a mouse and don't provide enough information about its limitations.
V-USB can block 50us at max and this prevents from handling PS/2 signal with ISR of pin interrupt(on falling edge). This is reason why hardware USART is needed for V-USB.
You can build firmware for V-USB with 'make -f Makefile.vusb' and I think it still works.Yes, those ATtiny seem to be pretty small, but I don't have to go that small. Most important is that it can be soldered and programmed without too much hassle. TMK seems to be written in C without using the Arduino libraries - that ought to help a lot already. And it looks very intresting. I think I'll have to dig deeper into TMK.
TMK firmware is rather big in terms of flash size, it requires 16KB at least by default configuration. I tested it on ATMega168 and ATmega328 years ago. You will have to disable many features and rewrite some code to use it on ATtiny with small flash.