Hello. If you follow the channel, you have seen the HP 9825 calculator from the 1970s
doing cameo appearances here and there: during the Apollo guidance computer restoration or the
HP tape salad extravaganza. It makes for a great period HP-IB instrument controller which I like to
use to remote control the HP power supplies [while] doing our restorations for example.
I wanted to add a clock module to use in fancy real-time test applications,
like our infamous fancy pants dude in the HP catalog,
but none of the clock modules I acquired ever worked. I amassed no less than six of them,
with zero successes after attempting simple repairs. That is, until I decided to take the
bull by the horns and repair them all in what turned out to be a five episode repair-a-thon.
The repairs turned out to be quite an entertaining drama, with release of magic smoke,
use of vinegar for non-culinary purposes and recreation of early Texas Instruments LED watches.
But in the last episode, we prevailed, and successfully repaired the last of my six modules.
All right, so now that I can claim to be probably the one with the most clock interfaces working in
the world, what do we want to do with it? Well we want to play like Mr. fancy pants, right,
and, wait for it, before we do it, we have to wear the fancy pants. So they came back,
it's available on my store, my Teespring store. It started as a joke with some of the commenters
that wanted to see where to buy the fancy pants, and here they are! The magic vintage repair pants.
And that's on your butt, the front is okay [plain], and it says: "repairs any vintage
electronics guaranteed" with a little curious mark logo. Those actually turned out super nice,
I'm very surprised. I don't know how they print it, but it's much much better than what they do
on the T-shirts, and the interior is super soft. And the detail on it is incredible.
So let's go wear that, and from then on we'll have only success. Okay, fancy pants are on,
no vintage electronics can resist me anymore, we are ready to do some serious work. And before
we start, it's important to understand that this module was quite amazing for its time.
Because it it's not only a clock like this one it's supposed to replace, there's also a
timing generator. So actually this replaces these two boxes that were available before,
and were, you know, HP-IB boxes. They are meant to work together. There are actually little hooks
on the side of each, and here you go, you can make them play nicely together. So we'll look
not only the clock functions which are pretty straightforward, but a lot at the timing
functions, because there [are] four timers with four inputs and [four] outputs in that little thing.
And similarly, the HP 9825 is not your average 1970s calculator either. It is excessively well
built and is powered by a proprietary HP NMOS 16-bit multi-chip-on-ceramic processor. Two very
similar processors were used in the famed HP 9845 workstation. So I have one of the clock modules
plugged at the back of the 9825, and of course you can do what you expect, which is read the clock.
And it will give you the date and the time, and if you read it continuously, it will just update.
So that's the normal clock function. But as I just told you, this unit also has also
many timers in it. And one of the fun use of the timers is to time the operations of the computer.
And let's load a program that calculates prime numbers for example.
So this is going to calculate the first 500 prime numbers.
And it's kind of slow because - I'm going to stop it actually - it's kind of slow because it spends
its time printing. So I have the same program that does the 5000 [first] prime numbers. It's
program two. I load it from the tape, and we'll run it.
And it doesn't print, it it's just on the display. And it starts kind of slow, because
it's a sieve process. So first it takes a long time and it goes fast, fast, fast and faster.
It will go up to 5000, which is the max you can do on that machine because of memory.
So here, now imagine you want to know exactly how long that takes. Well you could take your
chronometer, but you can use one of the timers on the clock module. So I have the same program,
program number four on the tape. It makes the use of the timer in the clock module.
Let's see if we can show you how that works. So what this cryptic line says is:
write to interface nine, which happens to be the clock module. So on the module, you have a little
arrow that you can turn, and change the address. And the default is nine, so I left it there.
And then you send it this cryptic string. And this is to set one of the four counters, in this case
unit two - U2 - as an input counter. So before you can do it, you have to halt it, so it's U2H, it's
"U2 Halt". Then you define it as the input counter one, and then you start it - "U2 Go". And then,
just before starting your program, you send it "U2 Clear", so [it] sets the counter at zero.
And then that's my program that calculates the 5 000 prime numbers. It's not very long.
It's like a few lines long. And now I am going to send it "U2V", which is Value of U2, and read it
back into variable T. And then display it, I'll display T. So here we go, we run the whole thing.
And the counter has started in the clock. It's counting in milliseconds,
so the resolution of the clock is in millisecond steps.
And off we go. So it took 23 seconds and 146 milliseconds. And you can use that to time
programs or measurements. So another use of the counter is to generate regular interrupts,
to interrupt your program and maybe take a measurement, so pretty much what this little guy
was doing here, the timing generator. And here I have a program that does that: it interrupts the
calculator every second and will have it beep. And it's very simple. So if I go - so the first
line, I declare an interrupt routine. So, on interrupt nine coming from the clock module,
go to the routine 'beep', and then I just "eir", it's "enable interrupts". And then here is another
of those cryptic setting lines: I halt a few units, I'm going to use U1 for this time,
set it as an output, which is also generating interrupts, and I set the period to a thousand
milliseconds, so every second. And then I tell it to go - "U1G". So I just take that to start.
And then I do a single line loop here, I'm just incrementing a number,
displaying it, and going back to the same line.
And it's going to interrupt that count every second, go to the interrupt handler named "beep",
which is just going to beep and then reinstate the interrupt and return. So if we run that,
we have our program running, and every second,
it's getting interrupted. Usually that would be for taking a measurement.
And you don't just have one counter at your disposal, you have four. So here is the same
improved program where I enable interrupts, but this time - still have my old unit - but I'm
going to add another one. I'm going to use Unit 2. And this time it's at 2.1 seconds intervals.
And same loop incrementing the number. Now the interrupt routine is a little bit
more complicated, because I have to check which counter interrupts it, so I have to
ask it for which counter did that, and I do bit tests. If it's counter one I just do one beep,
if it's counter two I do two beeps. And I have to put a little wait statement,
which is not a good thing to do in an interrupt routine, because it hangs up the machine
basically. So when it does two beeps you'll see the count stutter a little bit. But for simplicity
that's what I chose to do. So let's run it and you'll hear
the second, the double beeps, at a completely different period than the first one. So you can
have up to four completely different periods to generate interrupts.
Not bad for a small calculator! So next, we are going to use even more
functionality of this module. So at the back, you've noted that there is a little plug,
and you can kind of pop it off. And inside there's a connector. We haven't talked about it yet,
but at the back of the module, on the clock board, there is this connector here.
And normally it has this grounding shroud on top of it, which grounds all the inputs.
I can put it back together. But there is actually a little outlet, so on interfaces
that don't have the cable it's plugged. You can pop the plug out, and put our own cable.
And that will give you four inputs, four outputs, and a bunch of grounds.
You could order this module with option 100, which would give you a nice beautiful cable made by HP,
but I made my own. And I have it hooked up back there. And what this thing does,
it gives you inputs and outputs and this is to mimic this instrument. So right now, for example,
I have the older instrument here, generate - actually ten to the third, so it's 10
milliseconds - and you can see them on the scope. Actually they are hard to see because they are
smack over the lines of the scope. [I'll] make them a little closer together.
But if you look at them, it's a - look at that - this is a HP quality pulse. It's an ECL device
so it's very fast. So it's a 500 nanosecond pulse every 10 microseconds. So this is really
very convenient. Here right now, it's set at 10 microseconds, oh 10 milliseconds, but you
could do 24, and it jumps right to it. And it's it's fairly precise. So let's put it back to 10.
And now we're going to try to do the same thing with my little interface. So back there
I have taken one of the output lines and I brought it to the scope on the green trace. It's
on the green trace, and right now, I have only the older instrument doing the yellow trace.
And I've loaded a program, and it's very simple, it's a one-liner.
So it's this single line. This time I'm going to use the unit three, set it on the output line
three - there [are] four of them that you can choose - and generate a 10 millisecond
pulse train. One - two - three, I hit run, there you go. And you see the pulses. I still have the
the box version of it. Now they are both at 10 milliseconds. And let's actually trigger
on the other one. There we go. And it's the same idea really as as the box it replaces:
gives you a sharp pulse. It's longer, this one is about four, actually exactly four microseconds long.
And actually, let's see how precise that is.
I calibrated it recently so it should be good. I calibrated all the interfaces actually.
And we have 9.99999
point five zero. So not too bad. And if I want to change it for, for example, 15,
it's a simple change over here. Put the five, store it. Okay: one, two, run. And it switched to
15 milliseconds: 14.99999. So, same thing, you have four timers. So basically
you could do four trains of pulses totally independently. And now for the grand finale,
we are going to use the inputs, of which we also have four. And for that,
I hooked it up to this very fancy switch, which is actually an Apollo era switch that they used in
the ground control stations. By the way, Fran Blanche just released a delightful video about
this iconic, over engineered Apollo switches that were used in the mission control consoles. They
are high reliability, infinitely configurable, avionic lighted switches. They had a sea of them
in the MOCR, continuously flickering about. Nothing was more beautiful than them - er,
almost. Once I saw Fran's video, I knew I had to have one. I'll link her video in the Doodly-Doo.
That's some monster switching. And instead of having regular stuff at the back,
it uses micro switches of all things. And to take them apart, I'm glad Fran made an episode on it,
I wouldn't [have] found out. You take them like this, you turn them a quarter turn,
and here they come. And you can insert little lamps. And note that mine are blue,
and I thought I would get blue light. But not at all, it is just to make the lights
less yellow. So it comes [out] actually white when you put it back together. I'll show you a second.
It's there to make the incandescent light appear white. It's all wired up.
Okay we have a test button. By the way, they recently restored athe mission control, but
horrors of horrors, they use LCD screens instead of CRTs. I guess they had to make concessions
to practicality and cost, but as a museum artifact restorer, I am quite offended by that.
However it looks like they just used the correct switches. Here's one just like
mine being re-seated or replaced. So here we go, we'll measure our fancy switch, actually the time
it's pressed down, using the clock module. And the programming is more of the same. And this time
I use unit 4. I set it up to read the input line 4, and you'll guess what will happen. So it
waits for me to press the switch. And then it's going to measure the time until I
press it a second time. And I pressed it exactly for four seconds and 666 milliseconds. It is such
a great switch! You could switch in and out all day. And this one was more like three seconds.
So I think you get the idea, it's a pretty nifty box with a lot more than a clock [in] it.
And particularly for the time when it replaced much larger boxes. So I hope you enjoyed the
repair-a-thon and playing with the fancy clock modules. And don't forget
to use your magic repair pants if you do vintage electronics! And see you in the next episode.
What's the fastest I can do it? It's a heavy switch.
240 something milliseconds. I should have used a push button, that would have been much better...