Who has a working Unitek K-155?

User avatar
XMIT
[ XMIT ]

21 Jul 2015, 21:29

facetsesame purchased a Unitek K-155 from me. I've started testing keyboards before sending them. The K-155 failed testing. A logic analyzer shows that it does, well, something, but Soarer's Converter certainly doesn't play nice with it.

Both Redmaus and pwnnarwhal harvested their K-155s for switches so they are not data points. I think rsbseb has one too, I'll shoot him a PM.

From Redmaus's photo it looks like there are different revisions of the PCB. His is Rev. 6.1 and has a switch up top presumably to select protocol. Mine is Rev. 5.1 and does not have such a switch.

In particular, it is this board:

http://coronthica.com/by-uuid/77b051f0- ... 78b406355/

Image
Image

User avatar
XMIT
[ XMIT ]

21 Jul 2015, 21:34

To show you what I mean I've attached screen shots from Logic, the application that connects to the Saleae logic analyzer. I typed "d t". Included are:

- key code for "d" make: 00000100
d-make.jpeg
d-make.jpeg (172.31 KiB) Viewed 3579 times
- key code for "d" break: 00000101
d-break.jpeg
d-break.jpeg (172.85 KiB) Viewed 3579 times
- overview of make and break for "d" and "t"
d-t.jpeg
d-t.jpeg (165.46 KiB) Viewed 3579 times
Pin 0 was clock and Pin 1 was data.

If this is how it's going to be I can grab the make and break codes for every key and write up a patch to TMK. Would like to know if anyone else has had success with this board without as much effort. :roll:

User avatar
chzel

21 Jul 2015, 21:44

Did you try Soarer's on Pro Micro or Teensy?
Pro Micro clones have been known to go berserk with various keyboards!
A pro micro I had when faced with a Model M would hang up and spam key-presses until reset!

User avatar
XMIT
[ XMIT ]

21 Jul 2015, 21:50

I tried both an orihalcon Soarer's Converter and a knockoff Pro Micro board. I saw the same results on both. Plus the logic analyzer traces above are straight off the PCB, no converter at all.

Plus those are not the scan codes I would expect at all for 'd' or 't'. For 'd', from http://www.computer-engineering.org/ps2 ... odes2.html :

MAKE 0x23
BREAK 0xF0,0x23

User avatar
rsbseb
-Horned Rabbit-

21 Jul 2015, 22:37

Mine had the switch on back I think it was for AT/PC. It was tested with a din to ps2 and ps2 to usb adapter as I recall. I'm pretty sure the switch was in the PC position and it functioned fine with my laptop.


*** EDIT *** I just found an old picture of mine and it had the 6.1 pcb
Last edited by rsbseb on 21 Jul 2015, 22:44, edited 1 time in total.

User avatar
facetsesame
Mad Dasher

21 Jul 2015, 22:44

I was in the process of replying to your PM but I'll pick this up here.

José, this is just incredible! I tried to ask just for clarification whether the board didn't work specifically with Soarer's converter or didn't work on native or generic converted AT/PS/2 and went to bed. Little did I know that XMIT would then get busy logic analysing the board! This is by far the most in-depth support I've ever had on a used keyboard purchase!

In short: if you want a keyboard, buy two from this guy!

rsbseb's K-155 (S/N 318138) is rev 6.1 and is now in my hands. The board has a typical XT/AT switch on top. With this set to AT, it seems to function normally like any PS/2 keyboard, working well electronically using an AT / PS/2 adapter and a "blue cube" PS/2/USB converter. Some of the switches need attention, mind. I don't yet have a Soarer converter unfortunately.

Looking at set 1 (this was used for PC/XT, right?)
http://www.computer-engineering.org/ps2 ... odes1.html

Set 1:
Key: D
Make: 0x20 (0010 0000)
Break: 0xA0 (1010 0000)

Comparing that against XMIT's K-155 S/N 309233 analysis result:
Key: D
Make: (0000 0100)
Break: (0000 0101)

On this limited evidence, it seems the sequence is either reversed, or is missing a nibble and a bit. Weird!

User avatar
scottc

21 Jul 2015, 22:55

Oooh, imagine if it was just PC/XT with the endianness swapped! I can't see any notes about TMK supporting XT. If it does though, I imagine it'd be a quick swap... very exciting!

User avatar
XMIT
[ XMIT ]

21 Jul 2015, 22:57

I don't like loose ends, and, I was looking for an excuse to break out the analyzers. I have stacks of keyboards that need their protocols properly reversed. Get your cheap knockoff logic analyzers here!

http://www.ebay.com/itm/141272714960 (UK)
http://www.ebay.com/itm/141718225529 (elsewhere)

Are XT codes sent LSB first or MSB first? If you mirror the codes that I provided they match exactly (meaning that the keyboard works just fine). The bits that I typed in are in time order, left to right. This page suggests LSB first:

http://retired.beyondlogic.org/keyboard/keybrd.htm

This page also suggests a parity bit and a stop bit which are not evident in the diagram above. I bet that's the problem.

I wonder, then, if this points to a bug with Soarer's Converter. It seems to really struggle with Set 1 in general. I have plenty of other XT boards that just plain don't work.

Sounds like it's time to add XT protocol support to TMK.

facetsesame did buy this board and we were trying to figure out if I should issue a refund or mail it anyway. Sounds like I should mail it. Shoot me a PM with what you decide.

User avatar
rsbseb
-Horned Rabbit-

21 Jul 2015, 23:04

If facetsesame decides to pass - I'll take it. I kind of miss mine now that the collecting bug has bit me.

User avatar
XMIT
[ XMIT ]

21 Jul 2015, 23:07

Heh. I thought about keeping it too. But MrsXMIT reminds me that getting keyboards out of the house is a worthy goal.

This would make a very nice Round 5 / Round 5a board. I have some others in mind: a 122 key battleship, and the NCR magnetic valve board, among others.

User avatar
rsbseb
-Horned Rabbit-

21 Jul 2015, 23:41

I would cover it in SCM myself

User avatar
facetsesame
Mad Dasher

21 Jul 2015, 23:50

XMIT wrote: I don't like loose ends, and, I was looking for an excuse to break out the analyzers. I have stacks of keyboards that need their protocols properly reversed. Get your cheap knockoff logic analyzers here!

http://www.ebay.com/itm/141272714960 (UK)
http://www.ebay.com/itm/141718225529 (elsewhere)
That makes feel a little better about this. Those logic analysers look like a really good deal... but I'm really behind in all my existing projects.
XMIT wrote:Are XT codes sent LSB first or MSB first? If you mirror the codes that I provided they match exactly (meaning that the keyboard works just fine). The bits that I typed in are in time order, left to right. This page suggests LSB first:

http://retired.beyondlogic.org/keyboard/keybrd.htm

This page also suggests a parity bit and a stop bit which are not evident in the diagram above. I bet that's the problem.
I've dug out an IBM AT doc from '85 and they suggest the 11 bit transmission is a "Mode 2" data stream which is associated with scan code set 2 i.e. AT but is switchable (in that particular implementation) between sets 1 to 3. A distinguishing factor is apparently the state of the host clock line immediately following power-on reset (if it's high, the auto-switching keyboard will choose Mode 1, otherwise will try the basic assurance test and will choose Mode 2 if the host responds as expected, otherwise falls back to Mode 1).

Mode 1 data streams are exclusive to scan code set 1 and consist of 9 bits, a high start bit followed by the 8 data bits, LSB first. (Mode 2 is LSB first too apparently). If this is to be believed then there is a missing start bit - if I'm reading your screenshots correctly I'm seeing 8 clock pulses with the data bits only, nothing else. Perhaps this is a non-standard (lazy?) implementation - on the evidence I have an IBM XT wouldn't accept this but perhaps a clone XT would.

User avatar
facetsesame
Mad Dasher

22 Jul 2015, 00:00

So this situation just got more interesting!

My goal here is a nice working K-155 with Cherry switches. XMIT's has the PCB with the Cherrys, redmaus has provided me a very nice condition case (sadly not the board, though if he'd saved it we wouldn't be having this discussion now), and rsbseb my first taste of the K-155 with unknown clone switches.

So if we sort this protocol madness out, a chimera of XMIT's and and redmaus' carcass would make what I'm looking for.
(It would indeed then get spherical caps - one of the attractions was all the 1.25 unit keys which I have a special use for...)

This means that rsbseb could have his K-155 back! It's still intact, functional and I think I still have the box it came in!
As I say though, some of the switches aren't registering without bottoming out so they will need looking at.
Now where do we go?!

User avatar
XMIT
[ XMIT ]

22 Jul 2015, 00:01

Yep, I see data bits only. You are reading them as I did, which I hope is correct! :-P

Just let me know what you want me to ship to you, if anything at all.

User avatar
facetsesame
Mad Dasher

23 Jul 2015, 00:11

I'd been thinking all day "I wonder what it says if the clock line is set high?". Now that the board is in transit I guess I'll need to get one of those logic analysers and find out for myself!

Or worse, various different XT clones...

User avatar
XMIT
[ XMIT ]

23 Jul 2015, 03:04

I've got plenty more XT clones that don't work with Soarer's Converter.

Engicoder

23 Jul 2015, 04:52

I built my own XT to PS/2 converter (uses an ATTiny85), so I am familiar with the XT protocol. Both XT and PS/2 send the LSB first, so the codes you are seeing are correct. The break code is just the make code with the MSB set. As facetsesame noted, the problem is with the start bit.

The XT protocol differs from PS/2 in that the data is read when the clock is high (instead of low) The keyboard pulls the clock low, sets the start bit (always 1) on the data line, followed by a high pulse on the clock line. It then sets bit 0 and pulses the clock high. This is repeated for each data bit. Finally a stop bit (more of a half bit) of sorts is sent by pulling data low and setting clock high.

TLDR; Confirming what facetsesame noted; There should be 9 high pulses. This keyboard sends only 8, so it is skipping the start bit. Furthermore, the idle state of the data line is high while XT uses low idle.

Looks like you'll need a converter that accepts XT data with or without the start bit and disregard extraneous data line state.

Post Reply

Return to “Workshop”