(Correction Version 1.2)
Hello, everyone...
Before i start, 2 things....
1- I dont speak very good english, so please be kind and patient.
2- This post is about a work in progress, and i present this info with no compromise.
About a month ago, i bought three NEW Tipro 128 (Cherry rc series branded) PS/2 keyboards in México. I bought them because the price was absolutely ridiculous (19.02 US Dollar). I did not know at the time how hard would it be to program them, as most of you know this series can only be programmed on 32 bit systems and adapter or Virtual boxes won't help at all. I opened them up and started checking what could be done.
There is an unfinished connector on the board right next to the PS/2 / DIM connectors (CHECK PICTURE WITH RED CIRCLES AND ANNOTATIONS) using a logic analyzer i found out this port was an i2C protocol port. The data consists of this bytes: 2, 4, 4, 1, #, #, 255. Those numbers are:
The number 2 is the slave address (check i2C protocol specs), the two 4s i still don't know, the number 1 is how many keys are you pressing at the same time, and the two last numbers are the key ids and the 255 marks the end of the packet, this way you can parse it easier. You get a row of numbers for pressing a key and a different one when lifting the key. If you press several keys, it would send you a row like this: 2, 4, 4, 6, 131, 233, 122, 143, 111, 97, 255 (where the 6 is the number of keys pressed and the rest are the ids of the keys.
With an Arduino UNO i made a sketch to act as a i2c slave, On the sketch you need to select i2C address to (1) because the Tipro uses 8 bit address while Arduino (standard) uses 7 bit, so you only slide the bits one click (Clock click). (SKETCH FOUND AT END OF POST)
When you capture the data with your Arduino you can do whatever you like with it, parse it, send it over serial, or if you have an Arduino Leonardo you can make it pass as a regular USB keyboard.
Thanks and ask me questions if you need.
#include <Wire.h>
void setup() {
Wire.begin(1); // i2c bus with address #1
Wire.onReceive(receiveEvent);
Serial.begin(9600);
}
void loop() {
delay(100);
}
void receiveEvent(int howMany) {
if(Wire.available()){
for(int i=0; i <= howMany;i++){
byte c = Wire.read();
Serial.println(c);
}
}
}