Microcode Diagnostics - 2
Some basic ‘heartbeat’ functions have been verified using a single instruction test microcode. The next stage is to use multi-instruction microcodes to test higher logic engine functions.
Display Principles
The display in the 600 and 700 series machines is done in a low-hardware manner, by connecting the display columns to the RAM address and the display values to the RAM data. The low order digit of the RAM address selects the display digit, 0=RHS and F=LHS. Access to a RAM location will show the data from that location in the display digit corresponding to the low order digit of the address. By reading from 15 successive locations the 15-digit display will be filled. Note that in this scheme all RAM accesses are reflected in the display which leads to flickering as RAM is addressed during computations. The 600 series machines have a cunning circuit in the display driver to suppress the flickering: the display is blanked unless the lowest order bit of the RAM address remains stable for greater than 7.26msec.
The display on 600 machines can therefore show several general patterns:
- a stable multi-digit display if microcode is able to access RAM and then cause a stable and sufficient delay so as to unblank the display
- a single random digit position if no microcode is executing
- a blank display if no microcode is executing or if the executing code is not generating the correct pattern of RAM access and subsequent delay.
Note also that Wang used at least two different seven segment decoder ICs and these produce different patterns for digit values greater than 9. This does not affect calculator operation since all displays are in decimal format and use only 0-9 but must be remembered when interpreting diagnostic displays which may use values from 10-15, these will display as non-numeric patterns according to the segment decoder IC.
DISPKEY Display and Keyboard Test
This diagnostic is the first step for a machine that appears faulty, it contains two routines that help to distinguish between fundamental faults that prevent any code execution and local faults that allow execution but cause errors.
DISPLAY8
Display Test
This uses eight fairly simple microcode instructions to read from 16 consecutive RAM locations with an appropriate delay between reads to unblank the display. If successful, each digit of the display will display some random power-on value from RAM. While the values are unpredictable (and may include blank digits if the RAM value is 0xF), the presence of some display suggests that troubleshooting should continue with diagnostic microcodes. No display suggests that more basic hardware analysis is required.
Running DISPLAY8 did show a plausible display, suggesting that code was running and that troubleshooting should continue with the more detailed KEYTEST microcode.
KEYTEST
This diagnostic uses a slightly wider range of microcodes to monitor the keyboard and user switches, and display the switch settings and the value received when any key is pressed. More specifically:
- A number from 0-7 is displayed according to the ROM restart key used to launch the test
- 0=Prime, 1=Verify, 2=SetPC etc
- Run, Learn, L&P, List, Fl/Sc are shown in a display digit
- PrinterOn and Deg/Rad are shown in a display digit
- When a key is pressed, its two-digit keycode is displayed
- A count of keys pressed is displayed
- A count of presses of Step is displayed
Results:
Keytest
- a display is seen, showing that the microcode loops are executing
- digits expected to be blank show a character corresponding to a value one less than the blank code
- the digit showing ROM restart is one less than expected
- the digits showing Run, Learn and other button states are one less than expected
- one digit of the keyboard keycode is correct but the other is one less than expected
- counting of keypresses and Step presses does not work
This looks like a complicated set of faults. The common observation that numeric values are one less than expected looks quite peculiar until one notes that Wang microcode does not have an explicit ’load’ instruction, so a common method of setting a value is to use the add instruction and add the required value to zero. If an ALU bus was stuck high then that bus would generate a value corresponding to -1, rather than zero. Hence values set using ‘add to zero’ would actually be set using ‘add to -1’ and hence would all be one less than expected.
This complicated set of symptoms may point to a single cause - an ALU bus stuck in the set rather than zero state.