IBM 5110/5120 keyboard conversion

User avatar
snacksthecat
✶✶✶✶

26 Nov 2018, 23:49

I titled this post "5110/5120" because I'm not sure which one it is. If you know, please chime in :)

I bought this a few months back and have yet to do anything with it. I'm told that this particular keyboard is difficult to fit with an xwhatsit since the controller is integrated into the PCB. That's a shame, but at least (for the time being) I'll still get to poke around with the protocol and see if it can be converted natively.

I posted a bunch of photos the other day so I'll dump them here for completeness.
Spoiler:
Image

Image

Image

Image

Image

Image

Image

Image

Image

Image
The maintenance guide for the 5120 is available on bitsavers so that's fantastic news. I didn't find it in the document myself but koalapear, in another thread, posted this image of the pinout:
Image

I'm going into this not really knowing what to expect. I apologize in advance if I don't get far with it. Hopefully we'll be able to find some interesting stuff.

Wish me luck!

User avatar
snacksthecat
✶✶✶✶

27 Nov 2018, 01:44

So glad to find that pinout table. The 5V line was easy enough to trace but I would have never figured out that it separately needs 8.5V on another pin.

I pulled a 9V step-up regulator from another project and hooked everything up.

Image

Then I interrogated each pin with the logic analyzer and (!!!!!!).... nothing :cry:

Based on a hunch (maybe the same thing could be gleaned from the pinout table), I attached a pullup resistor to each pin and tried again. When I got to the strobe pin, I finally got some signs that this thing is still alive. Here's what it looks like (starting zoomed out then gradually zooming in with each picture):

Image

Image

Image

Image

That's great and all but I'm still not getting anything when I hit keys (on any of the pins).

I'm trying to make sense of this section in the maintenance manual:

Image

Image

It's in english and I understand all of the words, but I have no idea what it's telling me to do. I'm confident that the keyboard is probably expecting me to do something that the keyboard IO adapter card would normally do, but I'm clueless as to what I should try next.

Anybody got any ideas?

John Doe

27 Nov 2018, 09:35

Interesting thread, follow this absolutely.

User avatar
lucar

27 Nov 2018, 15:11

Hi!

I'm not an expert nor I know anything about Ibm 5110 keyboards but this reminded me the description of the internal working of keyboards given in the 1977 book "Microprocessor Interfacing Techniques (Sybex)" by Austin Lesea and Rodney Zaks. I have the 1980 italian version of the book.
http://mirror.thelifeofkenneth.com/lib/ ... s_text.pdf

On page 95 of the PDF text , corresponding to page 93 of the original book there is a general explanation of how a "scanning chip" is used to implement a keyboard controller using a counter. It looks to me that the description "this code or key is created from the number in the scan counter ..." is the same general principle of operation. I think You have two parts in the keyboard circuit, one scans the matrix using a counter and a strobe to signal that a key code is ready ( in a parallel o serial register, maybe the latter) and the second one that post-processes the code with a cpu (J2 processor card) with data exchange between the two passing through the "I/O card adapter".

This is what I understand from the text You provided.
If this is true, if I was You , I would try to monitor chat between processor J2 and the keyboard scanning chip identifying this "I/O card adapter" ...

I'm in love with Your posts.

Cheers
Luca

User avatar
lucar

27 Nov 2018, 15:27

I took a look to the "maintenance guide for the 5120 available on bitsavers" that You mentioned and on page 2-76 there is the Z4 socket pinout You published.

Is Z4 the "I/O card adapter" mentioned? If so , strobe and (parallel) data from the "scan counter chip" are there...

Luca

User avatar
lucar

27 Nov 2018, 15:43

Oh, and You have to pay attention to point 2) of the guide "the selection of a device address then makes the data available on the bus in bits lines"

So the 5110 keyboard should worlk like this:

a) a key is pressed and released
b) a "scan counter chip or circuit" records the keycode in an internal register and a strobe signal is triggerred (Kbd Strobe on Z4)
c) a cpu acknowledges the strobe signal from the keyboard and addresses the keyboard (how??) that in response makes the 8 bit keycode available at Kb0 to Kbd8 pins on Z4

That is what I understood

Luca

EDIT: the manteinance manual is ambiguous on the "keyboard adressing", it looks like the 8 bit (Kbd0-Kbd8) data , with KbdP apparently being a Parity Check, is latched without any means of keyboard adressing in reality.
Also , I see a Power On Reset signal (do we have to reset the keyboard to make it work?) and a Keyboard Lockout signal (do we have a locked keyboard?)
:)
Last edited by lucar on 27 Nov 2018, 16:15, edited 5 times in total.

Engicoder

27 Nov 2018, 15:53

From the pinout you posted, I would assume, as lucar mentioned, that the data is parallel, i.e. Kbd 0 through Kbd 7 are the bits of the scan code and Kbd P is a parity bit, although a parity bit is unusual with parallel data.

Engicoder

27 Nov 2018, 16:03

lucar wrote: Oh, and You have to pay attention to point 2) of the guide "the selection of a device address then makes the data available on the bus in bits lines"

So the 5110 keyboard should worlk like this:

a) a key is pressed and released
b) a "scan counter chip or circuit" records the keycode in an internal register and a strobe signal is triggerred (Kbd Strobe on Z4)
c) a cpu acknowledges the strobe signal from the keyboard and addresses the keyboard (how??) that in response makes the 8 bit keycode available at Kb0 to Kbd8 pins on Z4

That is what I understood

Luca

EDIT: the mantainace manual is ambiguous on the "keyboard adressing", it looks like the 8 bit (Kbd0-Kbd8) data , with Kbd8 apparently being a Parity Check.
Also , I see a Power On Reset signal (do we have to reset the keyboard to make it work?) and a Keyboard Lockout signal (do we have locked keyboard?)
:)
I think the addressing is not an action that occurs at the keyboard I/O level, but rather at the "BIOS" level. I.e. a piece of software would use the keyboard bios address to "address" the keyboard and read the data latched when the strobe is received. If you look at page 3-11 in the maintenance manual it discusses device I/O at the software level. I assume the keyboard data is probably latched by hardware when the strobe is received.

User avatar
lucar

27 Nov 2018, 16:09

I think the addressing is not an action that occurs at the keyboard I/O level, but rather at the "BIOS" level. I.e. a piece of software would use the keyboard bios address to "address" the keyboard and read the data latched when the strobe is received. If you look at page 3-11 in the maintenance manual it discusses device I/O at the software level. I assume the keyboard data is probably latched by hardware when the strobe is received.
I agree with You , this is how it usually works.

luca

User avatar
snacksthecat
✶✶✶✶

28 Nov 2018, 01:00

@lucar and @engicoder, you guys rock. I’m going to take a closer look at the Kbd 1-7 lines tonight when I get home. I think the “Kbd 0” is actually a letter ‘O’.

If that’s the case, I’m allowing myself to get my hopes up a tiny bit because it’s very similar to the model f bigfoot pinout.

Image

That keyboard works with Soarer’s controller using a configuration that I don’t understand (I remember something about “muxstrobe”)

Here is Soarer’s explanation of how to read from the Bigfoot:

Image

If I understand that correctly, I’m actually supposed to be telling the keyboard which key I want to know the status of (using Kbd 1-7) and the keyboard will respond back. That doesn’t really jive with the other stuff we were reading about the 5110 but it does seem awfully coincidental about the similar pinouts so I’ve gotta explore it a bit.

@engicoder, if it turns out to be parallel I’ll buy you a beer

User avatar
snacksthecat
✶✶✶✶

28 Nov 2018, 03:20

I'm able to get it to do one notable thing and it only works with a single key (backslash).

If I put pull up resistors on all of the lines we've talked about (kbd strobe, o, p, 1-7), I observe the following things:
  • kbd strobe goes up and down, but does it in pulses
  • kbd o and kbd p stay high
  • kbd 1, kbd 2, and kbd 4 go up and down (no pulses)
  • kbd 3, kbd 5, kbd 6, and kbd 7 stay high
If I start hitting the backslash key, the following things happen:
  • kbd 1, kbd 2, and kbd 4 go low and stay low as long as I press the key
  • kbd strobe also seems to get interrupted, but keeps doing its pulses
Here's a video of me hitting backslash 8 times:
And the accompanying screenshot:
Image

It's a shame that I haven't been able to find much documentation about this keyboard. IBM seems to have very extensive documentation, and I've found good information about much more obscure keyboards in the past, but maybe this one was so integrated into the computer that it was an afterthought. Either that or it's just really hard to find good google results because of all the other links pertaining to the machine in general.

So here I am again, excited by this tiny clue but still lost as to where to go from here.

User avatar
snuci
Vintage computer guy

28 Nov 2018, 03:40

snacksthecat wrote: @engicoder, if it turns out to be parallel I’ll buy you a beer
Buy him a beer!

The IBM "5120" is actually an IBM "5110 Model 3" so both keyboards are the same between as they are both 5110s.

Note the scan codes and the bottom of this page explanation on how the scan code is derived (from positive and negative levels on pins Kb0 to Kb7. The "P" or parity line is even if this example is correct. It is highlighted below.

Hope this helps.
IBM 5110 key code.jpg
IBM 5110 key code.jpg (246.62 KiB) Viewed 918 times

User avatar
snacksthecat
✶✶✶✶

28 Nov 2018, 03:43

snuci wrote:
snacksthecat wrote: @engicoder, if it turns out to be parallel I’ll buy you a beer
Buy him a beer!

The IBM "5120" is actually an IBM "5110 Model 3" so both keyboards are the same between as they are both 5110s.

Note the scan codes and the bottom of this page explanation on how the scan code is derived (from positive and negative levels on pins Kb0 to Kb7. The "P" or parity line is even if this example is correct. It is highlighted below.

Hope this helps.
IBM 5110 key code.jpg

Dude that does help. Thank you so much.


But I swear to God that's an "O"!!!!


Image

Engicoder

28 Nov 2018, 05:12

Comparing it to others one the same page, it is definitely the capital letter 'O' and not the number zero '0' but the question is, is it a typo.
@snuci, do you happen to have the schematics for the 5110 (i.e. Ibm 5110 System Logic Manual)

User avatar
lucar

28 Nov 2018, 10:39

can You press the 'C' key so that we can compare the effect against @snucis table?

User avatar
snacksthecat
✶✶✶✶

28 Nov 2018, 14:14

lucar wrote: can You press the 'C' key so that we can compare the effect against @snucis table?
Right now I don't get anything when I hit any keys (except for backslash).

I was checking voltages on the individual ICs and noticed that some aren't getting any power. Would this suggest a bad capacitor? I traced the lines back and ended up at this capacitor where it's 9v going in but nothing coming out.

User avatar
snuci
Vintage computer guy

28 Nov 2018, 14:16

Engicoder wrote: @snuci, do you happen to have the schematics for the 5110 (i.e. Ibm 5110 System Logic Manual)
Interesting. I actually have a document set from a 5110 that I acquired a while back. I'll check.

User avatar
lucar

28 Nov 2018, 15:33

snacksthecat wrote:
lucar wrote: can You press the 'C' key so that we can compare the effect against @snucis table?
Right now I don't get anything when I hit any keys (except for backslash).

I was checking voltages on the individual ICs and noticed that some aren't getting any power. Would this suggest a bad capacitor? I traced the lines back and ended up at this capacitor where it's 9v going in but nothing coming out.
capacitors are not supposed to let dc current flow, as far as know. how are you powering the board and are there any voltage regulators on the keyboard pcb? Check that you're providing enought current and voltage to the keyboard pcb.

User avatar
lucar

28 Nov 2018, 15:55

Oh! On page 5-24 of the "IBM 5100 portable computer Maintenance Information Manual"
https://www.slideshare.net/LeonHenry/1970s-manual-ibm
there is a block diagram of how the main board handles the various parts of the assembly.
If You read carefully the schematic , it seems to me that:

a) Kbd Strobe , Kbd 0-7 and kbd P are outputs from the keyboard
b) Kbd Strobe is input to a flip flop that triggers an interrupt INT3 (a key has been pressed)
c) Power On Reset POR , Keyboard Lock and Typamatic are input to the keyboard

You might have to PowerOnReset the keyboard and unlockit before using it maybe.

Luca

User avatar
lucar

28 Nov 2018, 16:05

Also , on page 5-47, there is the internal keyboard logic block, it looks to me that Keyboard Lock gates the Kbd0-kbd7 register...

And POR should be just a pulse to reset all the logic.

Luca

User avatar
seebart
Offtopicthority Instigator

28 Nov 2018, 16:08

Great thread and very good work!

User avatar
snuci
Vintage computer guy

28 Nov 2018, 17:50

lucar wrote: Oh! On page 5-24 of the "IBM 5100 portable computer Maintenance Information Manual"
https://www.slideshare.net/LeonHenry/1970s-manual-ibm
there is a block diagram of how the main board handles the various parts of the assembly.
If you need searchable manuals, please go to my site here: http://vintagecomputer.ca/files/IBM/ It's far easier to find "keyboard" or "scan" or "kbd1" etc. as they are searchable PDFs.

User avatar
lucar

28 Nov 2018, 18:24

snuci wrote:
lucar wrote: Oh! On page 5-24 of the "IBM 5100 portable computer Maintenance Information Manual"
https://www.slideshare.net/LeonHenry/1970s-manual-ibm
there is a block diagram of how the main board handles the various parts of the assembly.
If you need searchable manuals, please go to my site here: http://vintagecomputer.ca/files/IBM/ It's far easier to find "keyboard" or "scan" or "kbd1" etc. as they are searchable PDFs.

PERFECT!
With textual search I've seen that POR is a simple mechanical switch!
It's on page 5-43, last entry in the table and notes 1,2 and it's connected to ground on one side.

Great
Luca

User avatar
madrobby

28 Nov 2018, 19:25

snuci wrote:
lucar wrote: Oh! On page 5-24 of the "IBM 5100 portable computer Maintenance Information Manual"
https://www.slideshare.net/LeonHenry/1970s-manual-ibm
there is a block diagram of how the main board handles the various parts of the assembly.
If you need searchable manuals, please go to my site here: http://vintagecomputer.ca/files/IBM/ It's far easier to find "keyboard" or "scan" or "kbd1" etc. as they are searchable PDFs.
Good thing that manual handles the "when your vintage keyboard is so awesome it takes someone's breath away" situation
Screen Shot 2018-11-28 at 1.24.47 PM.png
Screen Shot 2018-11-28 at 1.24.47 PM.png (165.44 KiB) Viewed 739 times

User avatar
snacksthecat
✶✶✶✶

29 Nov 2018, 00:03

lucar wrote: capacitors are not supposed to let dc current flow, as far as know. how are you powering the board and are there any voltage regulators on the keyboard pcb? Check that you're providing enought current and voltage to the keyboard pcb.
I’m powering the board with the 5v off the teensy connected to the 5v pin on the board. And then 5v from the teensy connected to a 9v step up regulator that I had which is powering the 8.5v pin on the board.

I’ve not seen any voltage regulators on the board, though there are more components inside which I can’t recall since I only gave a quick look.

User avatar
snuci
Vintage computer guy

29 Nov 2018, 00:28

Engicoder wrote: @snuci, do you happen to have the schematics for the 5110 (i.e. Ibm 5110 System Logic Manual)
I have the 5110 System Logic manual and it is in one piece... literally. It is wrapped in plastic but water got to it and the pages are stuck together and it is petrified into one solid cube :(

User avatar
snacksthecat
✶✶✶✶

29 Nov 2018, 01:38

snuci wrote:
Engicoder wrote: @snuci, do you happen to have the schematics for the 5110 (i.e. Ibm 5110 System Logic Manual)
I have the 5110 System Logic manual and it is in one piece... literally. It is wrapped in plastic but water got to it and the pages are stuck together and it is petrified into one solid cube :(
Aw, thank you for checking and sorry to hear that.

On the bright side, I thought about this. Am I jumping the gun or is this really too coincidental to ignore???

Image

User avatar
snuci
Vintage computer guy

29 Nov 2018, 02:00

snacksthecat wrote:
On the bright side, I thought about this. Am I jumping the gun or is this really too coincidental to ignore???

Image
Try "A" and see what you get.

User avatar
snacksthecat
✶✶✶✶

29 Nov 2018, 02:45

snuci wrote: Try "A" and see what you get.
unfortunately no other keys produce any output at all.

User avatar
snuci
Vintage computer guy

29 Nov 2018, 02:49

snacksthecat wrote: unfortunately no other keys produce any output at all.
Out of curiosity, how about "shift /" ? This is very strange.

Post Reply

Return to “Workshop”