• Please review our updated Terms and Rules here

PET 2001 Keyboard Issue

DrAM19

Experienced Member
Joined
Mar 5, 2021
Messages
76
Location
Near Washington, D.C., USA
Hello All!

I am so glad that everyone here takes such an interest in vintage computers!

I recently came into a PET 2001 (black bezel) with the chicklet keyboard and 6550s/6540s. It has 6540-019 in it, so I guess that's the revision before the RAM/ROM was changed out from the 6550s/6540s.

When the PET came to me, it turned on but displayed garbage on the screen. I want to toss in what testing/repairs I did to get to where I am in the repair process, in case it helps someone else down the road.

After a bunch of forum reading and testing, I ended up buying a ROMulan PET RAMulator (from the user Nivag Swerdna, who posts on this forum). Using the ROM/RAM adapter (and many helpful emails with Nivag), I was able to verify that the full compliment (8K) of RAM is good. I then narrowed down the ROM issues to 6540-014 and 6540-015 (being H6 and H3, respectively). Both were bad! Interestingly, when I tried testing ROMs with VOSSI, it detected 6540-014 as bad, but did not detect the 6540-015 as bad. Not sure why. And so I got a couple 6540 adapters so I could replace the bad 6540s with modern EPROMs.

Something to note for anyone else down who uses a more modern EPROM like a D27256 (its what I have on hand!), make sure the check the block size! The D27256 has 32K blocks (its a 32K x 8), so I had to concatenate the 2KB ROM image I got from Bo Zimmerman's FTP 16 times, to fill the block. Otherwise, the ROM would not load. The Powershell command looks like this:

gc -Encoding Byte -Path ".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin",".\rom.bin" | sc -Encoding Byte output-rom.bin

*And so to my question/request for help*

Now that I am loading to BASIC (both from the ROMulan PET RAMulator and from the on-board chips), I have found that only certain keys work. Keys like B work while A does not, for example. Its the bottom row of keys, and the numpad, that work generally.

I am suspicious of the 6520 PIA in G8, but also of the 74LS145 (mine actually says DM74145N) in G9. I had a few Motorola MC6821Ps handy (and one Rockwell R6520P), which I swapped into G8. It did not resolve the problem, but with one specifc MC6821P did change the behavior (all others did not give me the cursor when BASIC loaded). With that one specific MC6821P, I now get the characters from the top row of the keyboard, when I strike keys on the bottom row. For example, the key labeled [ gives me a $ output.

What are my options for known-compatible PIAs and replacement buffers? I am prepared to desolder, socket, and replace the DM74145N if needed, but want to know the recommended chip. Is it a NOS DM74145N or is it a SN74LS145N? And what about the PIA? Should I expect these MC6821Ps to have worked, and maybe they just didn't because of the buffer? Or maybe the MC6821P isn't compatible either?

Thanks for your advice!
 
Are you sure it's not just the keyboard contacts?
The old carbon impregnated rubber contacts can harden and become less conductive as they age. They can also just become dirty and it's not uncommon for many keys to stop working or work unreliably.

It could also be the PIA. If the 6520s are socketed, you can easily swap them to see if that's the problem. The other 6520 is only used for the IEEE port.
 
Thanks Hutch. I do intend on cleaning the keyboard, I have not done that yet.

Do you know what common PIAs are compatible replacements for the MOS 6520s? Should I have expected the Motorola MC6821Ps to have worked?

I tried both 6520s that were on the board originally, as well as the one Rockwell R6520P and 4 MC6821Ps I have on hand. Swapping for the other MOS, I got a black screen. For the Rockwell and 3 Motorolas, I got no cursor (and no keys displayed on screen). For the last Motorola, I got that odd behavior where the bottom key strikes registered characters listed on the top row of the keyboard. And only the bottom row got me keys on screen, as originally.

I guess part of that does suggest a cleaning, but I am also suspicious of the buffer.
 
Hello All!
Hello

Interestingly, when I tried testing ROMs with VOSSI, it detected 6540-014 as bad, but did not detect the 6540-015 as bad. Not sure why.
The testers often employ simple checksums... e.g. Adding up every byte and showing the remainder; such a scheme will fail to detect errors where multiple bad bits cancel each other out; True CRC checksums are better but still not foolproof; for an absolute comparison you need to compare individual bytes.



I am suspicious of the 6520 PIA in G8, but also of the 74LS145 (mine actually says DM74145N) in G9. I had a few Motorola MC6821Ps handy (and one Rockwell R6520P), which I swapped into G8. It did not resolve the problem, but with one specifc MC6821P did change the behavior (all others did not give me the cursor when BASIC loaded). With that one specific MC6821P, I now get the characters from the top row of the keyboard, when I strike keys on the bottom row. For example, the key labeled [ gives me a $ output.
I will let others opine but a 6821 should work; also W65C21N https://www.westerndesigncenter.com/wdc/w65c21-chip.php which are still made.
The change of behaviour is slightly suspicious... having a cursor and scanning the keyboard are slightly different issues.
If you have a scope check outputs of G9 to ensure it is scanning the keyboard. You could also probably simulate a keypress by using a jumper wire between one of J5 1-10 and J5 A-H to eliminate the physical keyboard.
Also try and run with only one PIA/VIA installed G8; i.e. remove B8 and A5 and see if the behaviour changes.

Welcome! (I'm relatively new here too)
 
First of all, welcome to VCFED.

We have found that some PIAs work and others don’t. Not sure which are which though. dave_m may be keeping track of this?

I agree that the cursor issue and the keyboard issue may not be related, but no flashing cursor probably means no interrupt which will result in no keyboard scanning.

You need to check (with a scope, logic analyser or logic probe) that the PIA outputs are scanning the key matrix. Then check that the keypresses result in a signal drive into the PIA.

It is more likely that the keys require attention.

With Nivag on using a piece of wire to prove the logic out and identify the keys as the problem.

You could also use my PETTESTE2KV4 in place if the EDIT ROM. This has a mode that will give visual indication of the state of the key matrix. It won’t identify whether it is keys or logic, but it is a simple visual test.

Dave
 
Thanks Hutch, Nivag, and Daver2.

Before I do anything else, the keyboard is getting cleaned.

I really like the idea of simulating the keypress with a jumper, to isolate the problem to keyboard or logic. That will be my next move after cleaning the keyboard (if that doesn't fix it outright!). Then I'll get the probes out and see what the PIA outputs show.

I did remove B8, but did not remove A5, while doing these tests (I wanted to try the 6520 installed in B8 in the G8 socket, and never put it back).

I did give PETTESTER a try and found that the keys which do not register a character on the screen show no bytes changes when struck. The keys which do register characters on the screen do show bytes changed.

Updates to follow soon.

Thank you!!
 
Hard to tell from only one example, but it would suggest that there is a problem with PA3 from the G8 PIA, the G9 '145 or the connection between them ( column for $ is [ minus 8 ). Have you tried swapping the PIAs as Hutch suggested? It does sound like a PIA problem; I don't know how many you've tried but could they all be defective?

Do the ] and @ keys work?

FWIW, I've never had a problem using a 6821 in place of a 6520 but that doesn't mean that it always works.

BTW, a 74145 is preferred here for the greater drive capability.
 
Last edited:
Thanks MikeS.

For that one MC6821P, the [ giving a $ output was just one example, yes. Sorry, I should have been more explicit. Every key on the bottom row registered with a character printed on the top. So space gave ', @ gave #, shift gave !. It was every key in the row.

And to everyone helping me in the thread:

Speaking of the keyboard, I pulled it apart and cleaned the board and plunger contacts. They keyboard looked really clean. I saw no corrosion or contamination, and did not notice any broken traces.

When I bypassed the keyboard by shorting select pins on J5 A-H to J5 1-10, I only ever got characters that the keyboard would have also put on screen (like $). It was repeatable (the same pin combination gave the same character each time), and most pin combinations did nothing. Using a voltmeter, I was getting 5v on the A-H pins, and just a floating voltage (meter said like 60mv but it says that for air too) on the 1-10 pins at J5. I didn't check the pull-up resistors yet, and did not get the logic probe on the J5 1-10 pins yet. I'll be doing that this evening.

If I don't get clear functionality on the J5 1-10 pins, I will be looking at the WDC PIA and possibly the DM74145N. (I am lucky, the wife got me a desoldering gun for Christmas, so it's not a bad task to do. But just throwing parts at a problem is bad practice too!)

Thanks all! Updates to follow.
 
If you get anything at all on any of J5 (1-10) and (A-H) use that as a base to work from. That means that you know for definite that you have one number output that works in the range 1-10 (let's say 5 for the purpose of my post) and one letter input that works in the range A-H (let's say A for the purpose of my post).

Use the working number (e.g. 5 from my example) and use it with A-H and see what you get.

Then use the working letter (e.g. A from my example) and use it with 1-10 and see what you get.

Post the results and let's look for a pattern.

If you have a logic probe, then check to see that the inputs to the 145 are all oscillating (on pins 12, 13, 14 and 15) - this would indicate that part of the PIA is working (PA0..PA3).

Then check that all of the outputs from the 145 are oscillating on J5 1-10 - this would indicate that the 145 is probably working.

After that it is probably the PIA...

Dave
 
Hi All.

Updates on testing. First, I decided to re-install the original MOS 6520, since it has shown the most keys (and accurately) of all the PIAs I have tried.

When I tried PETTESTER, I only saw bytes changes on keys that would have shown a key on screen too. I did not take note of which bytes changed and to what.

When making a jumper between J5 A-H and J5 1-10, I constructed a complete keyboard map table, which I have attached as a PNG to this reply. Every character in the table was something I got to register on the screen of my PET using the jumper. The highlighted characters are ones which worked when I depressed the key on the keyboard. It seems like all of G and H, and all of 7, 8, 9, and 10 work (I am assuming some of the (nothing)s, especially in 9, are things like the SHIFT key, and I could not tell).

keyboard map.png

I am also pasting the spreadsheet here as a tab-separated table. The working keys are noted below, both as characters and as positions on the table.

KEY MAP 1 2 3 4 5 6 7 8 9 10
A ! " Q W A S Z X (nothing) *R
B # $ E R D F C V @ [
C % \ ' T Y G H B N ] SPACE
D & \ U I J K M , (nothing) <
E ( ) diamond P L : ; ? > *C
F left arrow (nothing) up arrow (nothing) (nothing) (nothing) return (nothing) (nothing) (nothing)
G HOME CRSR down 7 8 4 5 1 2 0 .
H CRSR right CRSR left 9 \ / 6 * 3 + - =

WORKING KEYS
T,return,Z,X,C,V,B,N,M,,,;,?,@,[,], ,<,>,CRSR(left, right, down),ALL NUMPAD KEYS

Working Keys on map
C3 F7 A7 A8 B7 B8 C7 C8 D7 D8 E7 E8
B9 B10 C9 C10 D10 E9 G2 H1 H2
G1 G2 H1 H2 G3 G4 H3 H4 G5 G6 H5 H6
G7 G8 H7 H8 G9 G10 H9 H10

When I tried my logic probe, I was always seeing a logical LOW with intermittent high indicated.

So I guess the intuition of the group here was correct (and I am not surprised), that the keyboard might be the trouble? I did quickly check for continuity across the rainbow wires from board to keyboard, and all were good. What would you say is the next thing I try to check?
 
Hi All.

(Sorry for the delay. It looks like a reply I posted two days ago got gobbled up and I assume did not make it to the mods for approval).

Because the PIA that was giving me the most success was the original MOS 6520, I reinstalled that PIA for these tests.

I ran PETTESTER, and it showed bytes for each key strike that would have registered a key on screen when in BASIC. For the keys that do not put characters on the screen, no bytes changed.

I decided to make a full J5 1-10 to J5 A-H keyboard map. I got characters for most all combinations, and certainly got characters that the keyboard would not put on screen. So this indicates that the intuition of this group (and it doesn't surprise me you were right!) was correct, there is a keyboard problem (whether there are other problems remains to be seen).

If you mark in this map which keys worked on my keyboard, what you find is that almost all of G and H work, and almost all of 7-10 work. The few, especially in 9, that did nothing; I would guess they are shift key functions and the like, which I could not see while testing one pair at a time.

Just to be sure, I checked all the cables from J5 to the keyboard for continuity. I got continuity for each one, so I do not believe any are broken (and of course, by getting letters all along and up the board, I guess each would have had to work at some point).

PET 2001 CHICLET KEYBOARD *A means inverted A
KEY MAP 1 2 3 4 5 6 7 8 9 10
A ! " Q W A S Z X (nothing) *R
B # $ E R D F C V @ [
C % \ ' T Y G H B N ] SPACE
D & \ U I J K M , (nothing) <
E ( ) diamond P L : ; ? > *C
F left arrow (nothing) up arrow (nothing) (nothing) (nothing) return (nothing) (nothing) (nothing)
G HOME CRSR down 7 8 4 5 1 2 0 .
H CRSR right CRSR left 9 \ / 6 * 3 + - =

Working Keys
T,return,Z,X,C,V,B,N,M,,,;,?,@,[,], ,<,>,CRSR(left, right, down),ALL NUMPAD KEYS

Working Keys on map
C3 F7 A7 A8 B7 B8 C7 C8 D7 D8 E7 E8
B9 B10 C9 C10 D10 E9 G2 H1 H2
G1 G2 H1 H2 G3 G4 H3 H4 G5 G6 H5 H6
G7 G8 H7 H8 G9 G10 H9 H10

Regarding tests with a logic probe, what my probe said was "Low with an intermittent high tone". I suppose that was the oscillation. This was the case for all of J5 1-10.

So now, what should I be looking for on the keyboard itself? I did not notice any broken traces or corrosion. The pads on the back side of the keys looked fine. Are these the problem areas, and I should look again in more detail? Or is there some other giveaway?

Thanks!
 
I'm having a little trouble following; do I understand correctly that the issue of various keys registering different keys than they should was only with one 6821 and that now every key that works registers the correct key? That would indeed indicate a keyboard problem and there are various methods for cleaning/resurfacing. Usually a good cleaning with ISP or equivalent of the key contacts and the PCB is all that's needed; if that doesn't do it sometimes a very light sanding of the contacts may help but failing that there are both resurfacing chemicals and adhesive replacement pads out there. You could even make your own disks out of aluminum foil...

If a given key gives the wrong code then there's obviously a problem with the PIA, decoder or connections as in the case of that 6821 which apparently has a problem on PA3.

This shouldn't be a difficult problem; good luck!

m
 
Let the mods catch up, they are busy people...

I haven’t fully checked your matrix against the ‘official’ one over at http://www.6502.org/users/andre/petindex/keyboards.html. I assume you have a 2001 graphics keyboard? You can check them off yourself. Remember that 0-7 are A-H and 0-9 are 1-10!

The ‘missing’ keys you have are truly missing, with the exception of two of them, which are ls and rs (left and right shift).

If correct, it looks like the key matrix is duff, not the electronics (although to get different results with a different PIA implies that you shouldn’t use that type of component).

Dave
 
Thanks MikeS and daver2!

Yes, I really appreciate what the mods do here. I figured my first post never even made it to them. They will surely get to my posts when they have the opportunity, I am not sweating it.

It is the graphics/chiclet keyboard on my PET. I will go over the keyboard map from 6502.org and see what is right and what is wrong. The ls and rs are a good point, and yeah I would not have seen them in this test. On a few quick checks, my keyboard map seems to match the one on 6502.org. That's a good sign.

I'll also give the PCB a light cleaning with isopropyl.

One thing that I could have been more clear on previously was that yes, I got different keys on the screen when I had the motorola PIA installed instead of the MOS PIA. The MOS PIA gave me the correct keys on screen when pressed, the motorola did not. It does seem like Motorola MC6821P is NOT a compatible PIA for my PET.
 
ALL RIGHT!!!

I tried isopropyl on the PCB for the keyboard but that did not fix the problem. I ended up using a sanding stick which claimed to be 800 grit (though I think it was much more coarse than that, probably ~250 grit), and gently sanded the pads for each key. I then cleaned the board with isopropyl, and then with a dry toothbrush. I reattached the keyboard plunger array and tested by looking for continuity to the correct pins combination (using the keyboard map as a guide). In most cases, all was good. A few keys were a bit stubborn and needed a second gentle sanding. But in the end, the keyboard works!!

Thanks all for your advice and guidance. I REALLY appreciate it!!!
 
Back
Top