Computers‎ > ‎Hewlett Packard‎ > ‎

HP 9830B

HP9830
The HP 9830B BASIC calculator

The HP9830B was introduced in 1976 as a memory upgraded version to the HP9830A from 1972. The list price was $8350 for the calculator alone. The HP9866B printer unit (on top of the actual calculator) sold for $3350.

The HP98x0 series calculators all shared the same type of CPU. A 16 bit CPU implemented using discrete TTL logic on mainly four boards. To make it simpler the ALU was bit serial.

This story describes the journey from a dusty machine with broken keys to a fully working calculator. There is a video describing it as well.

Our unit

This unit came with two big cartridge disk drives, similar to HP7900 and DEC RK05 and had been used for accounting. There were some keyboard templates indicating so. The labels on the disk cartridges does the same.

It had been in store for quite some time and was rather dusty and an immediate problem was that four keys were broken off and that that three key tops were missing. Those are "DELETE LINE", "END", and "5". 

I was able to buy a set of keys that originally came from a HP264x terminal keyboard. But still I missed the DELETE LINE and END keys which was not in this set. I was lucky to find one collector in the Netherlands who offered me a DELETE LINE key and one collector in Canada offered me the END key. Thanks a lot!



Cherry key switches
Then to the broken of key problem. I contacted Cherry. But there I could get no real response in this matter. They didn't recognize it even though it is printed "CHERRY" on it..

I tried to repair the broken Cherry switch. I bought some piano wire and bent it into a small U. Then I used a soldering iron to heat it up while slowly pressing it into the plastic of the key switch. It didn't came out 100 % exact.  

Repaired key switch
It seems to be off by half a millimeter from the centre. But to me it is good enough. It feels very stable and won't certainly break that easy.

In the end it turned out that a collector in Canada was kind to supply me with five key switches. So I didn't need to use my repaired ones.

Schematics

Tony Duell has created schematics for a great deal of HP machines. This is incredibly helpful since there are very few schematics available. Unlike DEC, HP didn't seem to ever have made them public. I contacted Tony and received his excellent repair guide for HP98x0 calculators. (His file is in postscript, and is rather small but I converted it to PDF for ease of viewing, then it became huge.) I also downloaded Tony's schematics. While searching the net for HP9830 related material I also found Brent's excellent page on the HP9830 and this HP9830 emulator.

Checking the power supply

After cleaning the unit from plenty of dust I went on following the guide Tony has written, starting testing the insulation of the transformer using a megger. No problems at all. Then (with all cards pulled out except for the PSU module) I powered it up slowly using a Variac. Measuring the voltages at the PSU output they all checked OK. But it appears that the +5V switcher need to have some minimum load as well as the 19.5 V output. The latter I would have discovered if I had studied the schematics before I applied power. The 19.5 is generated by a power source circuit and thus will give full raw voltage if not loaded. A 1kOhm resistor did the trick here and using the ROM backplane as dummy load made the 5V produce 5.01V. Since the 19.5V is slaving of the 16 V using a zener, without load on the 19.5V the 16V output started to rise. I presume that eventually the crowbar circuit would hit in, but I never got that far as I used a Variac. 

Working?

Well, with all voltages measuring correctly I just inserted all cards and hit the power on button. I was quite amazed that I got this:
HP9830 LED display - prompt

and after pressing random key and finding ENTER I got this:
HP9830 LED display - ERROR 4


Quality
I think I need to show how the internals of the HP9830 look like so I made this composite image of all the boards inside. Aren't they beautiful?
HP9830 boards

Cards all gold-plated. Fantastic! This is pure quality!

First and second row is the memory subsystem with the DRAM memory board based on TMS4060 4k NMOS chips. Third row is the cassette and display interface. Fourth row is the actual CPU. Fifth row is the display and PSU. The only difference AFAIK between HP9830A and HP9830B is the memory board (second row left) and the memory address board (top left)

Keyboard reassembled

HP9830 keyboard reassembled

After the key tops and key switches was received I was able to fully reassemble the keyboard. Nice!

Tape drive
I tried the REWIND button. But there were nothing but a spinning sound. No motion. I think that there should be a clicking sound from the solenoids. Either there is some fault or they were just stuck.

When I looked into the tape unit I found that the rubber on the wheels was quite worn, so I need to fix that.
HP9830 tape drive - worn rubber


New problems

The o-rings arrived in the mail and they were easily replaced. The clear leader lamp was broken so I replaced it with a white LED (yes I know it should have been a small 5V 60 mA filament lamp, but I argue that if a LED had been available in 1972 they would have used it). Then rewind started to work. The solenoids were just stuck.

I also tried the MARK command but it kept running for quite some time until it stopped and then the machine was completely unresponsive.

When rebooting I recognized that it was failing to calculate things. For example 2+2 became 8.4444444, but 3+1 became 6.4444444. Strange. This used to work perfectly.

Just pressing a number and then execute also gave weird results.

0 reported back as 2

1 as 3
7 as 9

but 8 as 32.9444444
and 9 as 33.9444444

18 as 20
19 as 21

but 

20 as 42
11 as 33
30 as 52
1000 as 3222

SQR(2) resulted in 2.22636363

and 2^2 in 41.96520965

What is going on?

However I could type in a small BASIC program like 10 DISP "HELLO WORLD" 20 GOTO 10 and it would run correctly.

It seemed that it adds 2 to each digit but when the digit produced carry (8+2) then it gives a weird float.

But it couldn't simply be some kind of problem in the keyboard input since it is handling line numbers OK. AUTO# also works just fine so basic integer arithmetic works OK.

Maybe it has to do with float numbers? I think that the memory subsystem is working since it can store a BASIC program and run it. 

I wasn't at all sure that it was a RAM or ROM problem since when I set it to FLOAT11 precision and entered 1000000 it responded 3.22222222222+E6. It was handling the exponent all right but the mantissa was wrong in each digit. The fact that it actually added two to each digit (22222 became 44444) turned my eyes to the ALU ROMs.

I checked the BCD ROM but it was exactly as the dump provided by Tony. One funny thing was that the machine could run BASIC programs without it! Although calculations gave even stranger results.

Then I checked the main ALU ROM. The first 128 nibbles read all right. But the last 128 nibbles were the inclusive OR of the corresponding nibble in the first half! Checking the schematics shows that the upper half is addressed by the BCD flag. So it makes sense that BCD arithmetics isn't working but all normal arithmetic works fine!

I ordered a replacement PROM from Bulgaria, programming of the chip was included in the price! Although I think it should work with the Data IO 29B I have here, I have had some difficulties in the past with some Harris chips that it was not able to program and I never tested to program a Signetics chip in it.

Running again

The programmed 82S126 chip arrived from Bulgaria today. Nikolay had done a good job programming it. I checked it in my DATA I/O and it verified OK. 

Soldering into place on the boards and my HP9830B was back to life again! It was now able to calculate things.

Now I was able to continue where I stopped when it all started to fail; getting the tape drive to work. Unfortunately it wasn't working very well.

The MARK command still made it spin for ever and when it eventually stopped the machine was completely hung. A power cycle was needed to recover.

Doing all sorts of other tape commands, like TLIST, STORE, FIND etc gave a ERROR 58 which seems to be some kind of general fault. And this happens immediately. It is not even trying to do something. 

I am a little bit confused by fact that the MARK command executes but never stops. What is the machine waiting for to happen? Since REWIND is working I think that the EOT/BOT LDR detector is working.

BOT sensor

I thought replacing the filament lamp with a LED was working all right. It turned out that it probably was too bright. It made that EOT/BOT LDR to make false positives.

I recognized this as when it did stop in the middle of the tape when rewinding and I pressed (and held down) the rewind button it just rewound very slowly (exactly as it did when on leader). Then when ejecting the cassette and replacing it again it started to rewind just fine for a while. I guess that the tape was slightly differently positioned with this maneuver. 

A slightly higher resistor value solved this problem. Now it would rewind the entire cassette many times in a row without stopping in the middle.

But still the MARK commands goes on for ever (until blank leader at EOT) and then the machine is completely hung. The other tape commands just give an ERROR 58.

I am about to get some extender card to actually be able to attach the logic analyzer probes. Those different connector size are pretty annoying... six or seven different extender cards are needed to cover the entire machine. As it  happened John Nery in the US was able to manufacture this kind of cards for me.

Extender boards


HP9810A
HP9810
We had been in contact with the Swedish Maritime Administration since they had a HP computer they wanted us to take care of. As it happened the easiest was to drive down to Norrköping and take a closer look at it. While looking I found a pallet marked HP9810! The HP9810 was brought home and cleaned. It was really dusty. Then I slowly applied AC through a Variac and checked the PSU. It was in good shape. But that was it with the 9810. It was dead when all cards were seated and it wasn't the PSU that couldn't handle full load; all voltages measured OK when cards were seated. Testing the CPU cards in the HP9830 revealed that the data path card and the clock card was BAD. The other two seemed to work. Switching in the HP9830 known good boards didn't help much. The only difference was that the STATUS lamp turned on after a while. So there are multiple problems.
Now its time to clean the HP9866 printer which I brought home from storage.

Tape drive working!
The HP9866 was very dusty indeed. Before applying power to it I reformed the capacitors. They were all in excellent shape. So I started it up. No immediate problems. The LOAD button worked and I was able to load paper in it.

Hooked it up with the 9830. It was a no go. However since both tape and printer is dependent on the I/O board in the processor I switched in the board from the HP9810A machine. Well, it didn't help much to the printer, but the tape drive started to work! 

I was able to execute the MARK command successfully, i.e. it stopped after a while instead of winding to the end of the tape leaving the machine dead. It could store a small BASIC program to the tape and the LOAD it back! 

Debugging the printer
I did  put my analyzer probes onto the micro address bus of the HP9866 control board which is present on the test connector of the control board. I had great use of the schematics Tony has created by reverse engineer the unit. 

To understand what is going on I also had great help from the work Tony had done to describe the micro code. I put it here for reference:


Code:
HP9866 Control State Machine
----------------------------

** Character Entry **

00 : 20    if(Stb/) goto (00,02) , ClrFlg
Start of main loop (also entry point on power on). Clear interface flag
(not busy) Wait for strobe pulse on interface
02 : 2B    goto (06) 
06 : C2    if(PrtChar) goto (12,11) , InClk
Load chracter into input register, set interface flag flip-flop
(indicating printer busy). Test if it is a printable character (including
linefeed). If not, ignore it. 
12 : F4    if(LF/) goto (19,1B) 
Is it a linefeed? 
1B : CF    if(Empty/) goto (17,15) 
Input character is a linefeed. Is the line buffer empty? If so, just feed 
the paper, if not, do a full print cycle.
19 : C1    if(Start/) goto (14,11) 
It's not a linefeed. Is the line buffer full (that is character counter = 0 
and empty/ flip-flop set). If so, ignore it (truncate the line)
14 : 9D    goto (0D) , SClk
Line buffer is not full, store new character in the shift register
0D : C4    goto (11) , PHOut
Increment the character counter, set empty/ flip-flop, and end this character
11 : C0    if(Stb/) goto (10,11) 
End of character processing. Loop until strobe is inactive
10 : 00    goto (00) , ClrFlg
Clear interface flag and round again.

** Print cycle **
Now to actually print a line. Begin by filling the unused space in the data
shift register with spaces
17 : 89    if(Start/) goto (04,05) , ForceSpace
Set the data input flip-flops to a space character. Exit from loop when the
line buffer is full (effectively a while(buffer not full) loop).
04 : 10    goto (08) , SClk
Load a space into the next buffer location
08 : EF    goto (17) , PHClk
Increment character counter and round again.

The line buffer is now ready, so print it.
05 : E6    goto (13) , Autofeed
Advance the paper one dot line 
13 : E3    if(Timing) goto (16,13) 
Loop until U26b times out to give the motor time to move
16 : 3E    if(Row7) goto (0B,0E) , InClk
Is this the end of the printed character (7 rows of dots printed)? If so,
goto the paper feed routine, starting by incrementing the row counter.
0B : 7B    goto (1E) 
1E : 84    goto (01) , RowClk
Increment row counter. This also controls the RotEn line so as to go into
printing mode
01 : 50    goto (18) 
18 : BF    goto (0F) , PHClk
Clock the 5 bits for the current row of the current character into the 
printhead shift registers.
0F : DA    if(char0/) goto (1A,1D) 
Is the line completed? This will skip the 4-chracter rotation at the end 
of the complete print line, so as to leave the line buffer in the same 
state at the start and end of a line. Thus each row of dots comes from 
the same chracters in the same positions.
1A : AF    goto (07) 
07 : 59    goto (1C) , ForceSpace
No, start to roate the line buffer by 4 characters. Now ForceSpace/ had a
second meaning. It increments the '4 character' counter U17a/b
1C : A7    if(LnFlg) goto (07,03) , SClk
Rotate the line buffer and round again if it's not been done 4 times 
(print every 4th character on each pass)
03 : D8    if(newbank/) goto (18,1D) 
Has a complete bank been loaded? If not, go back and load the next
character.
1D : 32    goto (0A) , PHOut
A complete bank has been loaded, so trigger printhead timing monostable
and print this bank of dots.
0A : 31    if(Timing) goto (0C,0A) 
Wait for U26a to time out (this bank has been printed).
0C : 8C    if(firstbank/) goto (01,05) , SClk
Rotate the line buffer by one character to get the next quarter of a line
into postion.  Has the character counter wrapped around so all banks have
been done? If so, back round, advance the paper and start the next dot
line. If not, then round again to start the next bank of data

** Paper feed **
This routine advances the paper by enough dot lines to complete the 
character and inter-row space
15 : 94    goto (09) , Autofeed
Clock the stepper motor counter
09 : 93    if(Timing) goto (0E,09) 
Loop until monostable U26b times out (to give motor time to move)
0E : FF    goto (1F) , RowClk
Increment dot row counter
1F : C5    if(RotEn) goto (15,11) 
Round again if dot row counter has not got back to 0 (RotEn = 1). 
Otherwise go to end of character processing


When doing a print command from the calculator I got a series of strobe signals, one for each character that is handled by the  micro code. 

I got a sequence that is 00, 02, 06, 12, 19, 14, 0D, 11, 10, 00 which matches very well what it is supposed to do. Then when it detects the LF character it jumps on a new path which ends up in waiting in state 13 until a signal that is called Timing is active, when it then jumps to state 16. From there it begins a sequence that never ends: 16, 0B, 1E, 01, 18, 0F, 1A, 07, 1C, 03, and then back to 18 again.

I then checked the signal /newbank but it actually toggles as it should, but the D, C, B, A inputs to the 74150 is 8, not 0 when executing the micro instruction at 03. It seems that the /RotEn signal which is connected to input D always is high! Checking the RotEn input to a 7404 on the board gives that it is always low. RotEn comes from the Data path board which I now need to check.

This is a model B!

Next step was to trace the signal on the data path board at U19 when I discovered that there were no U19 on the board! I never checked that it was the same board as in the schematics. I just presumed them to be identical. The boards in my HP9866 differs in that the data path PCB is 09866-66591 and the Control PCB is 09866-66592. The reason for the different board are that this is a HP9866B rather than the HP9866A!

HP9866B Data Path board

The Data Path PCB has a different character encoding ROM, SCM3632 from Motorola, with HP ID 1818-0167. It uses two Texas Instruments TMS3120 quad shift registers rather that three MM5052. 

I assumed that HP only changed the board layout, not the backplane connections: A quick check for the RotEn signal on the Data Path PCB reveals that it comes from pin 6 of a U8 which is a 1820-0071 chip. Google says this is a 7440. It matches pretty well with the HP9866A schematics Tony has made.


HP9866B Control board
The control PCB. I cannot tell what difference this board has. But the micro code ROM is the same HP part number so what was found in the previous post has to be correct. That would also mean that the same inputs and control codes to the 74150 are used. 

The next step would be to measure on the Data Path PCB at U8, U3, which is the 7490 and U13, 1820-0174, which is a 7404.


New failure
I was debugging the printer when the strobe pulse suddenly stopped coming from the calculator itself. I then checked if other I/O things like the tape drive was working. It wasn't... Remember that I have swapped in the card from the 9810 into the 9830 since it was working better. But apparently now also this one failed. 

Back to debugging the I/O interface board. After reading in Tony's manual and also checking the schematics I had an idea that it was the tape flag that wasn't detected properly. The tape flag is coming in through the /Bus IO Rd signal. Then via a 7410 to a 74121 mono stable flip flop onto a 7474 flip flop and then generates the I/O flag at the output of a 7453. Thus I hooked up my analyzer probes at U7, U8, U9 and U13:
Analyzer probes attached to the I/O interface board of the CPU


I had my HP1664 analyzer trigger on U7 pin 9 negative edge. The output from pin 1 of U8, the 74121 was rather interesting:

Logic analyzer view before changing the 74121 chip


It seems that this signal always is low, but the non inverted out works fine. Replacing it with a the 74121 from the other board (rather annoying that my rather big stash of 74XX didn't include a 74121, but 74122 and 74123) gave a much better output signal:

Analyzer view after replacing the 74121 chip


And tape commands worked as they have done before with the card borrowed from the 9810 (before it broke down). 

Back to debugging the printer

Before the failing I/O board in the calculator itself I traced the problem to the RotEn signal which was never changing. This signal is generated by the DataPath board. When examining this I recognized that my board wasn't as in the schematics. It lacked U19! My printer is a model B rather than the one in the schematics which is a model A which explains this.

I was on my own... I started to trace parts of the board that related to the RotEn signal. It was quite some differences compared to the A. Here is my schematic of part of the Data Path board.
HP9866B data path board schematics (part only)

I attached the analyzer probes to U3, U7, U8, U13 and U14. (Oops! Error in the schematics. one flip flop is marked U4 rather than the correct U9). Directly when switching on the printer I recognized that output 4 of U13, an 7404 inverter was toggling all the time while the input, signal Qd of the 7490 was low all the time. This was probably not OK.

As I replaced the U13 7404 with a new chip it would now actually advance the paper a number on lines, and it wasn't locking up as previously. It wasn't printing anything since the print head and print head PSU had been removed to not make any potential damage to it if there were some logic problems.

Working again!

I just checked the bank signals that selects which bank of the print head to energize. They all were good. It was a bit confusing since the marker on the male connector indicated pin 1 at exactly the reverse position. Then put back the print head and tested. It worked!

HP 9830B working


I have now to change the power on lamp on the printer and then to reassemble it fully. I made a short video that tells a bit about the HP9830.

YouTube Video


Replaced components

The following components has been replaced:
  • Two indicator lamps.
  • One lamp for the tape drive.
  • A BCD ALU 256 x 4 PROM on the calculator Data Path board
  • A 74121 on the I/O interface board
  • A 7404 on the printer Data Path board.
  • Five keys which were broken of.
  • Three missing key tops.
  • Two o-rings for tape drive wheels.

Further work

There is also a disk subsystem which consists of two very heavy 14 inch cartridge drives (and also a fixed platter), two equally heavy power supply units, a controller unit, cables and a ROM cartridge. All those things are in store. But I leave for some other year to restore.

Web resources

Â