• Please review our updated Terms and Rules here

IBM XT 5160 - Error 301

boohyaka

Member
Joined
Jun 3, 2022
Messages
26
Location
Switzerland
Hi guys!

First post after years or lurking, the usual introduction :)

After many years scouring local ads and such, I was extremely lucky and happy to score a 5160, very rare around here, 10 minutes from my home. My very first home computer in 1987 which started it all when I was 5 years old! :)
Machine was in a beautiful state, not used for many years, but looking very good. Main unit only, has both an EGA card (yay!) and a VGA Chips card that supports 8-bit, wonderful! No screen or keyboard, I'm not complaining it already felt like striking gold and I should have everything needed at home to at least make sure it work, even if I'd love finding a 5154 and a proper IBM supported keyboard at some point (any hint for those, hit me up :D)

Some deep cleaning, visual inspection, and PSU check later, I'm in basic setup mode to start it up for the first time (FDD controller, beeper, VGA card, keyboard). Starts right up, but "301" error showing up on top. 640kb checked fine so that's nice. I have no "true" XT keyboard so using USB4VC in XT mode. F1 does nothing when prompted after RAM check. Activity comes up on the USB4VC, and numlock + scroll lock do light up the keyboard LED so something is going through. Removed the USB4VC and tried about all my old PS/2 keyboards with a passive PS/2-DIN5 converter, and found at least 2 that seem to support XT as they light up with numlock. But still, 301 on boot and F1 does not work.

Flashed the BIOS to 05/09/86 (just why not), also tried to short pins 2 and 4 in the DIN5 connector to go in maintenance mode, which worked fine, computer booted in basic.
Checked continuity between the 5 pins of the DIN connector to the motherboard, all seems fine.

I think that's pretty much it...and thought I'd look for some guidance now as it seems it could be the keyboard controller that is faulty and we're entering the territory where it will all be quite new to me. I should have all hardware necessary, including an oscilloscope that I bought with the hope of teaching myself some electronics but I'm not there yet, and only have surface-level understanding of schematics and how I should test the keyboard circuit, so would need some precise instructions and hand-holding.

I'm adding some relevant pictures and looking forward to hopefully give a new life to this piece of history!

Cheers and thanks in advance

PS: extra question - case had this DB9 female connector on the small backplate, with a Molex passthrough (male+female)...anybody has a clue what this could used for?
 

Attachments

  • 1.png
    1.png
    3.2 MB · Views: 12
  • 7.png
    7.png
    3.3 MB · Views: 11
  • 6.png
    6.png
    2.7 MB · Views: 11
  • 5.png
    5.png
    1.4 MB · Views: 11
  • 4.png
    4.png
    3.3 MB · Views: 12
  • 3.png
    3.png
    2.2 MB · Views: 12
  • 2.png
    2.png
    1.3 MB · Views: 12
Hi. Welcome to these forums.

I think that's pretty much it...and thought I'd look for some guidance now as it seems it could be the keyboard controller that is faulty ...
Note that if the LED's on the keyboard momentarily flash as soon as the computer's power switch is flicked, in most cases, it has nothing to do with the 5160's power-on self test. As soon as the keyboard receives power, it is normal for the keyboard to do its own self test, and as part of that test, the keyboard flashed its LED's.

In fact, on my IBM 5170, I see the flashing on its keyboard happen twice. The first time is as soon as I power on the 5170 (the keyboard self initiating a self-test). The second time, after the POST does a RAM test (the POST issues a self-test command to the keyboard).

So all of this LED flashing that you see is possibly just the keyboard receiving +5V. You could check that by applying +5V to the applicable pins in the keyboard's DIN connector.

And note that on a keyboard in XT mode, the keyboard's LED's are controlled only by the keyboard. The XT keyboard protocol/wiring has nothing that allows the motherboard/BIOS to turn NUM LOCK, CAPS LOCK, SCROLL LOCK, on/off. All that the motherboard/BIOS can do is to 'soft reset' the keyboard (and the keyboard may flash its LED's as part of that). When you press NUM LOCK, it is the keyboard turning on/off the LED for the NUM LOCK. From what I have read, that is different to how things work in the AT and AT clones.

I have no "true" XT keyboard so using USB4VC in XT mode.
Which could be:
- USB4VC is faulty in XT mode ?
- In XT mode, USB4VC is incompatible with the IBM 5160 ?
- USB4VC faulty in some other way ?
- Faulty keyboard interface circuitry on the 5160 motherboard ?

Whilst you are diagnosing this, consider, in parallel, acquiring an XT2ATKB for your AT-class keyboards. It would be good to quickly identify if the problem cause is the USB4VC or the motherboard. And it would give you backup keyboard functionality.

I should have all hardware necessary, including an oscilloscope that I bought with the hope of teaching myself some electronics but I'm not there yet, and only have surface-level understanding of schematics and how I should test the keyboard circuit, so would need some precise instructions and hand-holding.
What is suppose to happen is shown at [here].

So the first thing to look for is, via oscilloscope, the 5160's POST causing the CLOCK line to go low for about 20 ms. I don't have an oscilloscope photo of that.

Following though, is an oscilloscope photo of the keyboard's response, which is the byte of AA hex. Top trace (1) is the CLOCK line. Bottom trace (2) is the DATA line. The zero volt levels are where you see '1' and '2' on the far left.

1719205464005.png
 
PS: extra question - case had this DB9 female connector on the small backplate, with a Molex passthrough (male+female)...anybody has a clue what this could used for?
I see it in photo #5.
Probably to provide power to an external tape drive or external floppy drive, ones that have a data connection to the 37-pin D connector at the end of the IBM supplied floppy controller.
 
Thank you so much for your help! About the DB9 with Molex, indeed forgot to mention it was in pic5...right, the external floppy makes sense. Also I ordered a XT2AT off ebay, thanks for the tip. Having a backup to clear doubt is always a good idea, even if the USB4VC ends up not being the issue.

OK, so my first steps with the scope it will be! I was looking at your doc, and also the schematics of the keyboard circuit there: https://minuszerodegrees.net/5160/motherboard/IBM 5160 - Keyboard interface circuitry.png

I still need to find a guide for very basic usage of a scope..I already went through the calibration and compensation, but I am not used to the controls and how to set them up to make sure I see what I'm supposed to see. I rely on the "AUTO" button way too much still :)
If you have any tips or a recommendation for a beginner's guide online aimed toward this kind of measurement I'd be grateful of course, but don't want to waste your time otherwise, I'll do my due diligence and look around online.

So first thing to check is clock goes low for about 20ms. Looking at the schematics, KBD_CLK goes to pin4 of U21. Is it therefore a good idea to try and measure it there? Basically if I understand the routine you shared, I should be able to measure the KBD_CLK and I should see:

- Power ON: CLK goes high
- Quickly after power on it should go low for 20ms
- Then if all goes well, I should see the trace of the AA byte of your screenshot

All of this before 301 is even displayed on screen, right?

If I do see all of that, it's likely the motherboard keyboard circuitry is fine and it may be a USB4VC issue, if I don't see that I come back with the results for further diagnostic? Does that sound right?

Thank you so much for your help, appreciate it!
 
Mmh I've been trying to measure around the KBD_CLK and KBD_DATA pins but not making much sense of it. I'll add a few pictures and a video of what I'm doing so hopefully it can optimize the help!
 
Setup attached. So I'm measuring pins 1 and 2 directly on the bottom of the DIN connector.
And here's a short video of what's happening:

Thanks again!
 

Attachments

  • setup.png
    setup.png
    3.7 MB · Views: 7
I still need to find a guide for very basic usage of a scope..I already went through the calibration and compensation, but I am not used to the controls and how to set them up to make sure I see what I'm supposed to see. I rely on the "AUTO" button way too much still :)
If you have any tips or a recommendation for a beginner's guide online aimed toward this kind of measurement I'd be grateful of course, but don't want to waste your time otherwise, I'll do my due diligence and look around online.
A big subject. Some knowledge of electronics (i.e. what it is that you are trying to measure). Some knowledge of oscilloscopes in general. Some knowledge of your particular oscilloscope.

Repetitive type (always there) signals

Clock signals, sync signals, etc. AUTO buttons are great for that. Mine saves me time.

Once-off signals

This is something one gets into after being confident about oscilloscope fundamentals (such as trace, timebase, volts per division, triggers) and the display of repetitive type signals.

This can become quite tricky. It depends on what it is that you are trying to capture. Complicated because sometimes the act of turning on the computer will trigger the oscilloscope.

Some basic discussion is at [here].

So first thing to check is clock goes low for about 20ms. Looking at the schematics, KBD_CLK goes to pin4 of U21. Is it therefore a good idea to try and measure it there?
But maybe there is an open-circuit trace, or solder joint. Ideally, one monitors the actual pin in the DIN connector, because that is what the keyboard monitors. No keyboard needs to be attached for that. If the pulse is not seen (assuming one knows how to see/measure it), one then moves backwards in the circuit to the source.
But you could go the other way: Look for the pulse on pin 24 of the 8255 chip (the source), and if seen, trace it forwards through the circuit.

On this subject, some people have found open-circuit solder joints on the motherboard DIN connector, typically caused by long term connector movement as keyboards are connected/disconnected. So take a good look at those solder joints.

All of this before 301 is even displayed on screen, right?
Correct. It is the POST, expecting at a particular time to see AA, not seeing AA (whatever reason, keyboard or motherboard) and then displaying the 301 to indicate a keyboard related problem.

( And as you will have read, a 301 can also result from a 'stuck key', but in that scenario, extra information appears after the 301, but you are not seeing that. )
 
Continuing ...

Flashed the BIOS to 05/09/86 (just why not), also tried to short pins 2 and 4 in the DIN5 connector to go in maintenance mode, which worked fine, computer booted in basic.
A useful experiment, showing some functionality.

On this subject, some people have found open-circuit solder joints on the motherboard DIN connector, typically caused by long term connector movement as keyboards are connected/disconnected. So take a good look at those solder joints.
On rereading post #1, I see that you eliminated that possibility.

And here's a short video of what's happening:
Showing the DC voltage levels. As always, I have 'other things on the stove', and so I will fully examine that later, and make comment.

Considering your present beginner-level knowledge of oscilloscope use, what you could do is wait for the AT2XTKB adapter to turn up, and from that quickly establish whether the problem is keyboard or motherboard. It could save a lot of time.
 
Mate thank you so much for your time, that's already awesome help. Your comments about the oscilloscope repetitive/once-off and the linked discussion about triggers made a lot of things fall into place in my mind, it makes so much sense and probably should've figured it out myself but here we are! I'm at work right now so can't really reply in-depth but still wanted to thank you for all of that.

Considering your present beginner-level knowledge of oscilloscope use, what you could do is wait for the AT2XTKB adapter to turn up, and from that quickly establish whether the problem is keyboard or motherboard. It could save a lot of time.

Absolutely, that's what I thought too. But...it will take a couple of weeks (if not more) to arrive and I also really want to learn new things, that gives me plenty of time and motivation to teach myself some more! Nothing beats a practical case to get to it, and your posts already cleared a lot of fog so thanks again :)

Extra note- tested the HDD controller and Type13 drive in maintenance mode...it's alive, sounds great, and boots to DOS! This thing really is in very good condition overall, I am lucky. I've set it aside at the moment. I'm really starting to think the problem may very well be with the USB4VC as you immediately hinted and the keyboard circuit is fine, hopefully I can learn a few things and clear that out with the oscilloscope soon!
 
And here's a short video of what's happening:
Showing the DC voltage levels. As always, I have 'other things on the stove', and so I will fully examine that later, and make comment.
I brought out my 256-640KB motherboard, fitted with 05/09/86 revision BIOS ROM's. No keyboard. Oscilloscope monitoring the DATA and CLOCK lines in the motherboard's DIN connector.

I see what you see.

Straight after power-on:
- The DATA line goes to HIGH, and stays at HIGH for the duration.
- CLOCK goes momentarily HIGH twice, then goes permanently HIGH at about the time that the 301 error appears.
 
Straight after power-on:
- The DATA line goes to HIGH, and stays at HIGH for the duration.
- CLOCK goes momentarily HIGH twice, then goes permanently HIGH at about the time that the 301 error appears.
Shown in the top capture of the three in the diagram at [here]. Yellow line is CLOCK, blue line is DATA.

The second and third captures show how different keyboards can behave differently. For example, the IBM 83-key keyboard is known for holding the DATA line at LOW.

IRQ1 being active is an indication that a byte was received from the keyboard.

Captures done by setting a timebase of 500 ms/div, then manually triggering the capture (via start/stop button) very soon after I turned on the computer.
 
Thanks again! Some updates today...

- I managed to reproduce your setup and have understood quite some things along the way ;) which is awesome. Here's what I get attached. Same result both without a keyboard connected, and with USB4VC (tried two different PS/2-DIN5 converters).
- On the USB4VC front, interesting update as I went to the support Discord, and the last message from yesterday was from someone with a 5160 XT getting a 301 error :) The USB4VC creator also has a 5160 XT apparently, and he will give it a go as well (no update yet).

In any case, the fact that my CLOCK line never goes high again unlike yours, is that a hint that something else may be wrong?

(PS: just a sidenote for a newbie question about scopes...I had to go to 1s/div, or I wouldn't be able to capture the whole thing at 500ms/div like you did..is it a setting, control or something I've been doing wrong?)
 

Attachments

  • Scope.png
    Scope.png
    3.9 MB · Views: 4
Correcting my lack of precision - "clock never goes high again" is wrong, it does go back to high once 301 is displayed and RAM counting has started. But on your graphs it looks like it's way quicker.
For what it's worth I measured it at U29 pin24 and it looks exactly the same.
 
(PS: just a sidenote for a newbie question about scopes...I had to go to 1s/div, or I wouldn't be able to capture the whole thing at 500ms/div like you did..is it a setting, control or something I've been doing wrong?)
Correcting my lack of precision - "clock never goes high again" is wrong, it does go back to high once 301 is displayed and RAM counting has started. But on your graphs it looks like it's way quicker.
On yours and mine, the second 'hump' on the CLOCK line starts about the 4 second mark.
But my oscilloscope has 18 divisions in the time domain, and yours has 12.
 
But my oscilloscope has 18 divisions in the time domain, and yours has 12.
That'll be why my oscilloscope was more expensive than yours. 🤣

I don't know whether you saw it or not, but there is an 'XYZs of Oscilloscopes' document at [here]. Includes descriptions of things like 'holdoff'. Comprehensive, but I would have ordered things differently.

Ideally, one starts with a simple oscilloscope like the one at [here], learning the basics. Getting a good/excellent understanding of the fundamentals makes the rest much easier to visualise and understand.
 
No I didn't see those documents yet, will read them thank you!!
I bought this scope second-hand from a friend for a bargain price, who basically never took it out of the box once, so it was hard to refuse :)

I did understand the time divs difference between our screenshots indeed and I noticed the clock go back high at 4 seconds for both of us, what I'm talking about is right after that - In yours, in the end clock stays high in all cases. In mine, with keyboard or no keyboard, it stays low:

1719380791849.png
 
I did understand the time divs difference between our screenshots indeed and I noticed the clock go back high at 4 seconds for both of us, what I'm talking about is right after that - In yours, in the end clock stays high in all cases. In mine, with keyboard or no keyboard, it stays low:
Okay. I misunderstood your post #13.

'No keyboard' should be the only comparison that we make, because you and I have different keyboard devices, and that can change behaviour (i.e. not then necessarily comparing apples with apples).

In a 'no keyboard' scenario, it is only the POST that is altering the state of the CLOCK line. Earlier, you indicated that you upgraded the motherboard BIOS to the 05/09/86 one. Is that one still on the motherboard ?
 
Hi again! Some (semi) closure - received the XT-to-PS2 adapter from Tinkerboy...and it works fine! So this XT looks in great health and the issue was with the USB4VC all along. I reported it to the creator and hopefully I can help him improve the firmware.
Now to explore and toy with the machine a bit more :) I'm sure I'll be back with more questions! Thanks for the awesome help & expertise modem7, much appreciated, really.
 
Back
Top