PDP-11/40 Wait Instruction Repair

PDP-11/40 Wait Instruction Repair

While running the diagnostic software for the KW11-L I found that one of my two M7235 Status cards would cause the tests to fail. Looking into the problem, I identified that the cause of the issues was that the wait instruction was not working.

Symptoms

When manually trying to run the wait instruction, it would immediately exit the instruction and continue running the program. When the diagnostic tests were running, they set up an interrupt and waited for it to trigger, but as the wait instruction was broken, it would just immediately resume the program; the test could detect that and fail the test.

Debugging WAIT

Reading the documentation and looking at the schematics, I found out that the PDP-11 sets a flip-flop when entering the wait state. This flip-flop is cleared once the wait instruction is complete.

Examining the output of the wait flip-flop while single-stepping the wait instruction, I saw a pulse from the flip-flop. The flip-flop should get set, and say set. A pulse on the flip-flop output implies either that the flip-flop is broken or that it has been set and immediately cleared.

Checking each of the flip-flop pins, I quickly identified that pin 10 (Preset) was receiving a malformed signal, a 2.1 MHz square wave with a peak voltage of only 1.7V (out of spec). This malformed signal was coming from a 7450 (AND-OR-invert), the input from pin 4 was partially "leaking through" the chip and making its way to the output when it should not have. You can see it in the image below.

The Fix

Replacing the 7450 fixed the wait instruction. Both Status cards now pass the diagnostics.