Home | About Me | Site Index
Compusaur Archiving the big and slow, machines of yesterday.
>Kenbak Repro
Mark-8
Kenbak-1
Altair 8800

 
 
1 INTRODUCTION:

1.1  Why was the Kenbak-1 Reproduced?

blankenbaker early     The Kenbak-1 was reproduced as a tribute to the ingenious machine of John V. Blankenbaker.  It is hoped that by spreading the knowledge of this device to a broader audience, more people will understand just what an incredible machine it was.  While many web sites mention this computer, details are so sparse about how it was used, and what it could do, that many people fail to believe it can be considered a true "Personal Computer."  I have found that even collectors who own an original Kenbak-1 may be hesitant to turn it on, as the switches were fragile (held on by brittle glue) and they definitely don't want to damage their valuable relic.  But with a lower-cost copy, I hope that many people can power it up, try to write programs, and get the true machine-language "blinking lights" experience that was the 1960's and 1970's computer revolution.  I hope that even museums which have an original Kenbak-1 could let visitors toggle in a simple program, and run it, without worry of damage to the original, and a much wider knowledge of the Kenbak-1 computer will be realized.  This project was for fun, not money, and I'll never recoop the money I spent on it.

1.2  How was this Kenbak-1 Reproduced? early board layout
     This is the result of over 300 hours of part-time work.  While the schematics of the Kenbak are freely available from many sources, including the inventor, it was a real challenge to construct a working PC board.  I got the idea of making one after viewing Erik Klein's Kenbak-1 computer at www.vintage-computer.com.  His web site seemed to show a reasonably simple circuit board, so I figured it shouldn't be hard to make one.  I then saw that schematics and logic diagrams were available from Herbert Eisengruber of The Computer Museum of Nova Scotia (www.computermuseum.20m.com) for a small fee, so I got a copy.  While this would have been enough information to make a computer, I really wanted the circuit board to be similar to the original, with the same general location of components and traces, so I asked Erik if he had any higher-resolution pictures of his Kenbak-1.  To my amazement, he sent me such high-resolution pictures, that I could read part numbers on diodes, color codes on resistors, and could follow traces almost perfectly.  With out Erik's pictures, I doubt I could have gotten this project working.
     Laying out the PC board wasn't easy.  From the photos I settled on a 16 x 9.25 inch circuit board, and found two free programs, TinyCAD (tinycad.sourceforge.net) and FreePCB (www.freepcb.com) which allowed me to go from schematics to printed circuit board in only about 100 hours of time.  I tried to make the boards look a lot like the originals, keeping in the spirit of the original machines, but all traces were laid out free-hand.  When I was happy with the board layout, I had several fabricated by APCircuits, the least expensive web-friendly maker I could find.  Just a week after sending them my data, I received the boards.
later board layout     The only error I found on the printed circuit board was an inadvertent connection between VCC and GND which took a lot of work to find.  This wasn't caught by the FreePCB program due to a bug which was later fixed.  Other than that, the only proposed changes on the circuit board for a second run would be cosmetic.  The computer worked perfectly after fixing a few early failing integrated circuits, and a short between a signal line and VCC, caused by some hastily repaired power-plane cuts when I had to find the previous VCC/GND connection.  The very last error, however, eluded me for over a year.  My project sat in my basement, with a logic analyzer hooked up to it, untouched, for almost a year.  Then, in November 8, 2006, a full copy of the Kenbak-1 "Theory of Operation" showed up on www.bitsavers.org on November 8, 2006.  I think this was directly from John Blankenbaker, based on the copy he placed on his web site (he doesn't seem to rely on any other sources for his web site, so I anticipate he is the original source.  This showed state diagram, with descriptions, which was the key to debugging the last problem.

1.3  How hard is it to Make a Kenbak-1?

     With a circuit board, and a little soldering experience, knowledge of basic electronics, the Kenbak-1 can be assembled in about 4-8 hours, depending on how elaborate or authentic the front-panel needs to be.  But a bit of debugging is very likely to be needed.  Even though I tested all of the 130+ TTL chips prior to assembly, 3 seemed to be non-functional during debugging.  Debugging the computer isn't easy.  A logic probe "may" be enough for some people, but I required a logic analyzer to get it running correctly.  Since the machine has a serial architecture (all data rotates around in circles, and all math/adding/comparisons occur one bit at a time) it really can be harder to debug than a similar parallel byte architecture.  At this point, I've actually developed some testing hardware and attachments, so I may be able to help debug other people's machines, but can't make any promises.  I tend to be very busy, and do have a day job and busy family life.

2.0   PARTS AND CONSTRUCTION DETAILS

2.1  The Parts List:

     In addition to the printed circuit board, there are about 131 7400 series TTL, a handful of 1N914 diodes, several capacitors, many resistors, and a few bipolar transistors.  All of these are readily available, and can be acquired from internet dealers, such as unicorn electronics (www.unicornelectronics.com) for under $40.00.  But there are two other integrated circuits which are a bit hard to find.  The memory is implemented as Intel 1404A dynamic shift registers.  I have purchased several of these on Ebay for $25 or less, but they are becoming scarce.  I found several vintage IC dealers on the network who promised to get me large quantities at $30 each, plus some expensive shipping.  But luckily, I found a source of AMD second-source components out of some old medical equipment.  These shift registers may be difficult to find.  If you have more money than time, I may supply a few, but may request around $100 each to discourage depleting my supply, depending on how many I have and if I find a new source.
     Here's the full list of all parts.  First the quantity, then the part number or description
  • 45x  7400 Quad 2-input NAND
  • 2x    7403 Quad 2-input NAND, Open Collector
  • 3x    7404 Hex Inverter
  • 1x    7408 Quad 2-input AND
  • 15x   7410 Tripple 3-input NAND
  • 3x    7416 Hex Inverter Buffer
  • 9x    7420 Dual 4-input NAND
  • 10x   7430 8-input NAND
  • 4x    7442 BCD to Decimal decoder (16-pin)
  • 1x    7451 Dual 2-wide 2-input AND-OR-INVERT
  • 10x   7454 4-wide 2-input AND-OR-INVERT
  • 10x   7474 Dual Type-D Flip-Flop
  • 3x    7486 Quad 2-input XOR
  • 13x   7495 4-bit shift reg
  • 2x    1401A 1024 bit shift register (8-pin metal can best.)
  • 6x  NPN transistors (2n2222a work well, have nice TO-18 metal can for vintage look, but bc547c T0-92 case is more authentic to true Kenbak machines.***
  • 2x  PNP transistors (2n2907a work, and have a nice TO-18 metal can for vintage look, but bc214 with a TO-92 case is probably more authentic to the early Kenbaks.***
  • 26x  1K ohm resistor 1/4 watt (0.09" x 0.25" size)
  • 4x  3K ohm resistor 1/4 watt
  • 4x  270 ohm resistor 1/4 watt
  • 2x  220 ohm resistor 1/4 watt
  • 4x  120 ohm resistor 1/4 watt
  • 2x  68 ohm resistor 1/4 watt
  • 1x  56 ohm ( this is a larger 0.7" x 0.33" wide 2-Watt Composite)
  • 1x 3K ohm resistor 1/4 watt  (R15's value, arrived by experimentation)***
  • 8x 1N914 fast switch diodes, DO-35
  • 1x 5.1V Zener diode 0.75 watt min (123 mA) DO-41
  • 1x 100 uF 16V electrolytic, 0.6" tall, 0.35" diameter
  • 1x 33 uF 6.3V electrolytic 0.35" tall 0.22" diameter 
  • 2x 0.1 uF, 16V disk, 0.6 inch diameter preferred
  • 2x 0.0015 uF disk used in oscillator, may need to adjust to get 1 MHz rate.***
  • 2x mica-dipped capacitors, needs to be about 0.20-0.23 inches between leads, approximately 6800 pF may need to experiment.***
  • 15x normally open push-button momentary switches.  Ability to attach authentic-appearing knobs are preferred.
  • 8x lights for bits, Yellow lite, but white/clear diffused lens preferred, LED or incandescent < 40 mA.  Incandescents which operate on 5V and < 40 mA are difficult to locate, so LEDs may be easiest.  Panel mounts also needed.
  • 4x lights for control, Yellow lite, with yellow diffused lens preferred, LED or incandescent < 40 mA.  See above.
  • 1x mini toggle switch to lock-out the "store" button.
  • 1x large toggle for main power switch.
  • 2x ??? uF electrolytic capacitor to debounce store memory and read memory switches.  I've run the computer without these, and it seems to work fine.
  • 1x Case, or at least front-panel on which to mount the switches and lights.  I've done some experimentation with reproducing the original case style, contact me if interested.
  • 1x  +5V 3A, -12V 0.5A power supply: while a linear power supply could be created as per the original Kenbaks and schematic, it's quite reasonable to purchase a small modern switching supply, which would possibly be more stable and protective of the delicate electronics.  On my computer, the measured currents were 2.??? Amps on the 5V line, and 0.2?? amps on the -12V line.
In the above list, the items marked with asterisks (***) may require some adjustment, as they were empirically determined, and may not be optimal.

2.2  Layout of Parts on Circuit Board:

     Here's the component layout mask, click on this image for larger image.  If any errors are found, let me know.

Component Positions

     Here's a detailed list of each part number, as found on the circuit board markings, and the component placement diagrams.  This is not a perfect list, and if errors are suspected, compare with the true part-number list from the TinyCAD partslist which can be found <HERE>.

Integrated Circuits
  • U3, U5, U7, U11, U12, U14, U15, U16, U19, U24, U25, U28, U30, U31, U33, U35, U38, U40, U41, U45, U47, U48, U51, U54, U57, U58, U60, U62, U64, U66, U70, U76, U85, U86, U87, U91, U92, U95, U98, U108, U113, U118, U119, U124, U129 - 7400
  • U102, U103 - 7403
  • U8, U10, U46 - 7404
  • U116 - 7408
  • U1, U13, U17, U18, U29, U36, U37, U44, U55, U56, U61, U71, U79, U83, U121 - 7410
  • U80, U114, U115 - 7416
  • U4, U21, U52, U75, U77, U94, U109, U120, U123 - 7420
  • U9, U63, U67, U74, U78, U88, U89, U96, U97, U110 - 7430
  • U125, U126, U127, U128 - 7442
  • U69 - 7451
  • U22, U26, U27, U32, U34, U65, U84, U93, U106, U107 - 7454
  • U23, U49, U53, U68, U90, U101, U117, U130, U131, U132 - 7474
  • U39, U43, U100 - 7486
  • U2, U6, U20, U42, U72, U73, U81, U82, U104, U105, U111, U112, U122 - 7495
  • U50, U59 - 1404A
Resistors:
  • R1-R2 1K
  • R3-R6 3K
  • R7 270
  • R8 220
  • R9 1K
  • R10 120
  • R11 1K
  • R12 120
  • R13 220
  • R14 270
  • R15 3K (value arrived by experimentaiton)
  • R17 1K
  • R18-R19 120
  • R20 1K
  • R21-22 270
  • R25-26 68
  • R27-R46 1K
  • R47 56 ohms - large 2-Watt.
Capacitors:
  • C1-C6 - power supply decoupling capacitors, apparently not installed in production machines.
  • C7 0.1uF 16V disk 0.6 inch
  • C8-C9 - decoupling capacitors - not installed in production machines
  • C10 100 uF 16V electrolytic 
  • C11 0.1uF 16V disk 0.6 inch
  • C12-C13 - decoupling caps - not installed
  • C14 33uF 6.3v elect - decoupler near oscillator
  • C15 - decoupler, not installed
  • C16-C17  mica-dipped capacitors, on bottom of board, 6800 pF is about right.***
  • C18-C19  0.0015uF disk, may need to experiment ***
  • C200-C201 - ??? uF radial electrolytics, mounted on front panel, switch debouncers.  With modern switches, these caps probably are optional.
Misc. Semiconductors:
  • D1-D8 - 1N914 diodes
  • D9 - 5.1V Zener diode, 0.75 watts or more (123 mA)
  • Q1, Q3, Q4, Q5, Q7, Q8 - NPN transistors (see part list)
  • Q2, Q6 - PNP transistors (see part list)
2.3  The TinyCAD Schematics:

     The following are schemataics/logic diagrams of the circuit board, redrawn on TinyCAD and then downloaded into the PC board layout software.  They complement the schematics in the Kenbak Theory of Operation Manual, in that these diagrams correctly tell "which" of several same-name signal lines.  For example, there may be two of the "CP" clock lines, and this schematic properly tells which one is "CP-1" and "CP-2".

schematic1schematic2
schematic3schematic4
schematic5schematic6
schematic7schematic8
schematic9schematic10
schematic11schematic12

2.4  How Authentic can the Reproduction be?:

      The reproduction can be as authentic as desired, but there are tradeoffs in cost and reliability.
  • Lights: The lights on the original Kenbak were incandescents, which today are hard to find at reasonable power and size.  T 1 3/4 size (5mm) lights are close, and the TTL open collector IC's can supply no more than 40 mA.  Radio shack actually sells a 6 volt 25 mA lamp which is fairly close (272-1140) but for solid-state reliability, LED's have some benefits.  The original lamp holders are not available, but a similar look could be made by chrome spray paint on inexpensive plastic LED panel clips.
  • Resistors:  resistortypesModern resistors  do look different than the 1970's carbon composition resistors, so for a real vintage look, do some searching for these old resistors.  They are readilly available on Ebay and most web sites by searching for "carbon composition" or "vintage resistors".
  • Power Supply:  Original machines had a large linear power supply installed in the back of the case.  This would be easy to fabricate, with a fairly small additional circuit board, but you can't beat the regulation and protection of a modern swithing supply, that can be found for under $20.  Getting cheap wall-wart supplies at 12 volts and 5 volts is also very economical, and the plastic cases can be opened up for more of a custom, fitted look.
  • Front Panel Switches:  The original Kenbak-1 used mercury-wetted pushbutton switches.  Early switches in the 1960's and 1970's did not have the contact technology we have today, so low-current resistance was high, and terrible "scratchy-bounce" problems were significant.  Logic designers often resorted to special switches which used a drop of mercury on switch contacts to decrease bounce and improve contact.  Relays are still available with this technology, but mechanical switches are not.  These early Kenbak switches were the most trouble-prone part, and frequently broke and had to be replaced.  One original Kenbak does exist with simpler toggle switches.  I strongly suggest using modern pushbuttons, with square keyboard-keys glued on to replicate the look, without the headaches.
  • Case:  Having an authentic "elongated hexagon" case is "frosting on the cake."  While it may be nice to have an open exposed circuit to show off, a nice case is a necessity.  I contacted "Bud Industries" to see if they had any of the parts for the original "grand-prix" case, and they said the extruded handles were no longer available, and reproduction would be cost prohibitive.  I've made a simple version with a metal sheer and bending brake, but construction did take time.
3.0  CONSTRUCTION DETAILS:

3.1  Populating the Printed Circuit Board:

It should be fairly straightforward to populate the circuit board with components.  Start with the flatest components, such as the resistors and diodes.  Then do the ICs or the IC sockets, whichever is the case, then lastly, install larger components like disk capacitors and the electrolytic capacitors.  This ordering will ease soldering, as the board will still lay flat, holding components on while soldering.

There is a single jumper wire on the back side of the board.  The location of this is on the layout diagram, but is also pictured on the left to assist in figuring out exactly which pads are involved. 

There are two capacitors which are mounted on the back of the board.  Location of these C16 and C17 are pictured above on the left.  Soldering from the solder-side of the board only will be needed for the one that is under an IC. 

 

 

 

 

3.2  Making the Front Panel:

The front panel can best be made out of 22 gage steel.  A template of actual-size layout is below.  Simply print this at 300 dpi on a large enough printer, on paper or clear plastic, and that can be applied to the panel of the right size/shape.  My switches and LEDs install in simple 1/4 inch diameter holes, so a metal hole-punch is a cheap and easy way to do this.  The power switch will take a larger hole, usually 5/8 inch or so. 

Note that the labels below the number 2 data light show the "4" shifted a bit to the left.  This was the layout of the production Kenbak-1, but was corrected in the CTI-5050 computer.  I chose to copy this mistake, in tribute to the true spirit of the machine.  Clicking on the link below will open a template for the front panel, at 300 DPI.  This is too large for an 8.5x11 inch page, so you would need a large format printer.  If you print at 300 DPI, it will fit on an 17x11 sheet (usual double-sided sheet.)  I made my front panel by spraying the steel sheet with primer, then contact adhesive, then placing the printed sheet over the top of the metal, and pressing it down.  Brushing the panel with sand-paper, then applying a clear plastic transparency sticker would probably be even more authentic, keeping with the "brushed aluminum" look of the originals.

The rear view of the front panel shows how the wires are all attached.  A nicer job with heat-shrink tubing could be done, but surely isn't necessary.  Notice that connectors are installed to aid in connecting and disassembling the front panel.  These will plug into headers, aiding in debugging and assembly.  The LED's here are standard T1 3/4 (5 mm) size, with cheap plastic clips available at any supply place (digikey/jameco) and these switches are C&K 8126 snap-action momentary switches.  The Key caps were pulled off a vintage keyboard, and epoxy attached to the ends.  This didn't work so well.  For a second version, I drilled out the inside of the caps with a milling machine, then epoxy glued in tiny key-caps made for the C&K 8126 switches.  I made a simple jig to get the caps centered inside the keyboard caps.  This worked well, allowed easy removal and made the switches much better lined up.  Epoxy appliance paint is a good way to get black and white buttons.  Notice that I'm not using the electrolytic capacitors as shown in the original kenbak schematics on the buttons.  With modern buttons, they are not needed, but could be added if you want..

3.3  Wiring up the Power Supply and Panel:

For ease in assembly and debugging, I added 0.025" headers to the circuit board for attachment of switches and lights.  This isn't necessary, but was worth it to me.  The 0.030 inch diameter holes are just a little too tight for the 0.025" square posts, so I used a file to round out the PC board side of the headers for fitting..  Later revision of board will make these holds larger for either wires of headers.

There are many power supplies that are available that fit well.  An industry standard 30-40 watt switching size is 3 inches by 5 inches, by 1.2 inches tall, that usually supplies 5 volts at around 3-5 amps, and -12 volts at 500 ma, (as well as not-needed +12 volts at 1-2 amps.)  I got several of the power supplies on the right, which I'm quite happy with.  They do have a minimum current, so trying to measure voltage without connection to a load, will not work.

Of course, it's possible to build a linear supply as shown in the original Kenbak schematics, but that wouldn't be easy, and may be more harsh on the fragile computer circuitry.

3.4  A Simple Case:

I made a case out of 22 gauge weldable steel.  Needed tools are a nice metal bending break, and a sheer to cut it.  This is one part that may be out of the reach of many hobbyists, but I figure that if ready-cut sheets could be obtained by a metal supply house (who would definitely have a nice sheer) the bending could maybe be done without too much work, or a cheap metal bender from "Harbor Freight" or on Ebay.

The measurements of layout for the top and bottom sheets are here: (photos pending)

First step, lay out markings on the sheets, a fine-point permanent ink pen is easier to see than a scribe.

Next, a few little pieces must be removed with tin-snips.

Then, the front and back flanges must be bent, but don't completely flatten them.  a small L-bracket will be placed later.

Next, I bent up the handle-tabs...

And next, the hexagon-angles are bent.  For this, scrap pieces of 22 gauge steel keep the flanges from being flattened too much, preventing the L-bracket from sliding in.

Now, the l-brackets are slid under the flanges.  While a spot welder or soldering would be traditional ways to attach these, I cheated, and used a bit of epoxy glue, then firmly flattened the flanges.  This requires de-greasing (spraying with 409, and thoroughly rinsing and drying works fine) so that the glue will firmly stick.

Last, after checking all angles, and seeing that they fit, with the front and back panels, sand with some fine sand-paper, thoroughly clean again, and then spray with a good quality primer paint.  Add 2 or more coats of color, and finish it off with 2 or more light coats of a clear sealer.

For the rear panel, I used a dremel and abrasive wheel to cut out the polygon holes, smoothed out the edges with a flat file, then I used epoxy to glue-in a screen-like insert.  Painting with the case-color works well.

A bracket for the power-supply was made of just a strip of scrap metal.  This doesn't need to be painted.

Lastly, the side-handles were cut out of wood.  A table saw can be used to quickly cut up many of these.  I used oak, because it's very strong, but the deep grain in modern oak makes this a real challenge to remove the grain pattern by sanding and painting alone.  I got a good metalic effect by applying shinny aluminum duct tape, and carefully trimming it.  A matte finish clear top-coat will take away excess gloss.  If you have a milling machine, real aluminum handles could be made, but this was more work than I thought I could devote.

 

 

4.0  TESTING AND DEBUGGING:kenbakdebugging

When the item is first powered up, don't expect it to run.  Anticipate the real work may have just started.  Here's a logical number of steps to try to get it checked out.

4.1  Power-Up  Initial Checkout:

Keep the expensive 1404A shift registers off the circuit board until it's signals and voltages are verified.

Check voltages:  Make sure the voltages are reasonable before hooking the power supply to the circuit board.  Then make sure the on-board regulator is generating the required -5 volts.

Check oscillator and 2-phase drivers:  We want about a 1 MHz square wave out of the monostable multivibrator (signal CT).  May not be too "square" but should at least oscillate between TTL high and low (below 0.8 and above 2.0 volts).  The design capacitors pick a slightly lower frequency for reliability, but after the machine is debugged, you can see just how fast your machine can clock.  The clock signal coming from the multivibrator is bound to look a bit like this, unless your choice of capacitors are quite large, in which case you'll be no where near 1 MHz, but you'll have a much more "square" wave...

It should be noted that the slew rate of this clock signal is pretty low.  That causes some issues if you feed this into both inputs of a 2-input NAND gate.  The resulting output of the NAND gate may not be a nice-smooth square wave, it may have a little irregular glitch, just after it switches.  This glitch interferes with the later flip-flop divider it feeds into.  Solutions are to slow down the clock to make the signal more square (I don't like that solution.)  Or you can tie one input of the NAND gate to +5V (this could be done by just bending the pin out of the socket, and jumping a little wire from it to pin 14) or alternatively placing a 40-100 pF capacitor between the output and VCC or Ground (I did experiment with this, and it removed the glitch) or lastly, substituting a 74LS series NAND gate for this will be more tolerant of the slower slew rates, and likely remove the glitch.  I've experimented with several of these methods.  I'd like to hear if other people had other thoughts.

Next, make sure that the signal Phi-1 and Phi-2, the 2-phase clocks after the level shifters, which go to the shift registers, are like this...

Next, make sure that signals T0-T7 from chips U81 and U82 correctly sequence through the 8 bit-times.  Only one signal should be active at a time.

Insert the shift registers only when you verify that the voltage and signals on each pin are reasonable.  5 volts, -5 volts, and the clock signals should be acceptable.

Check Stop/Start Mode:  Press the start and then stop button.  This should place the machine in "STOP" or "HALT" mode.  

4.2 Set and Read Memory:

There's a lot that must be working to set and read memory contents, so this isn't really a trivial operation.  With the machine in "STOP" mode (state QC) press the CLEAR button, and all the data lights should turn out.  The INPUT light should turn on.  Then one at a time, press some of the data buttons, and the corresponding light should turn on.

Press clear again, to turn off all the data lights, and press "SET ADDRESS" to set the address to zero.  Then press "READ MEMORY" 3 or 4 times.  Each time you press this button, you should get different data on the data displayed representing those memory locations.  You may write down a note of this data, to verify it stays the same.  Note this isn't actually random data.  The shift registers memories tend to be alternating ones and zeros, much of the time.

After reading out 3 or 4 memory locations, press "DISPLAY ADDRESS" to see what the current address is.  This should give the number 3 or 4, depending on how many times you pressed the "READ" button.  This verifies that the "W" register is correctly incrementing the address after each data read.

Next, press "CLEAR" again and "SET ADDRESS" to reset back to the first memory location, and then press "STORE MEMORY" a few times to store zero in the first few memory locations.  Again, press "DISPLAY ADDRESS" to see that the address counter incremented after each of these.  Then try to read those locations back, to see if you're setting and reading memory correctly.

4.3 Try to Run a Program:

Once you verify you can read and write memory, let's take the plunge and try to run a program.  This, again, is a big jump, so don't be surprised if it doesn't work right away.

Here's simple program.  It simply starts with the value zero in the A register, and keeps adding one to it.  After each add, it stores the result in location 200, which is also the output register, so the result is displayed on the front panel.  It then loops back to the top of the program, repeating it. 

 

	Addr Dat  Label Mnemonics	Comment                                                
000 000 A: C=0 (A register always location A, initialize with zero) 
001 000 B: C=0 (B register always location 1, initialize zero) 
002 000 X: C=0 (X register always location 2, initialize at zero) 
003 004 P: C=4 (The program counter location 3, program starts at 4) 
004 003 TOP: ADD A C=1 (add the constant 1 to the A register) 
005 001 (second byte of 2-byte instruction has the constant) 
006 034 STORE A (200) (store result in memory location 200, the output register) 
007 200 (second byte of 2-byte instruction has the address) 
010 344 JUMP TOP (jump back to location 4, unconditionally) 
011 004 (second byte has jump address) 

 
To enter this program, press clear, and "ADDRESS STORE", then for each of the program codes (000, 000, 000, 004, 003, 001, 034, 200, 344, 004) set the input register to them (press clear then press on the correct bits on) and then press "MEMORY STORE". 

After you've double checked that the correct information is in all of those locations, press the "START" key.  If you're lucky, the run light will remain lit, and the front panel lights will continuously count up ward from zero to 377-octal, and back to zero.

If it didn't work, start with something more basic, play around.  See if you can just execute some "no-operation" no-op instructions.  See if the P register changes at all when hitting the "RUN" button.  Sometimes an instruction is executed, but the P register (program counter) doesn't update.  Play around, and see what works, and what doesn't.

4.4 Debugging the STATE Machine:

After the above steps, you'll be well on your way to find out what your machine can and can't do.  With luck, it will run the above program, in which case you can test out all of the instruction set one item at a time.  If a particular instruction or operation isn't working, I've found a deep-memory logic analyzer (consider the PalmLogic, sometimes available on ebay for about $160) with at least 10-16 inputs, and at least 10,000 samples, really helps.  I set up 5 of the inputs to record the state outputs (the outputs of U130, U131, and U132, which are the latched version of JS0-JS4) and then I can see where the states are mis-functioning, and debug why.

Above are copies of the Kenbak-1 State Machine state diagrams.  In red, however, are the representatives for S4, S3, S2, S1, and S0, which will aid in debugging with a logic analyzer.  My debugging technique is to find an instruction that does not correctly operate, write a single-instruction program with that instruction, then hook the logic analyzer up to the state outputs.  I can then trigger on a state the program is expected to hit (falling edge of S0, which will occur as soon as the "RUN" key is released, is often a good place.)  Then I run the program, and see that the correct states are sequenced.  If not, it's a simple review of associated logic values will determine why.

Here is a view of a PalmLogic logic analyzer display.  The state lines are on the bottom, an octal representation of the state is just above that.  The octal nomenclature was done so that it corresponds with the red state designations in the above state diagrams.  The upper level signals were some intermediate signals

4.5 A List Test Suite to find Non-working Instructions:

The huge variety of instructions on the Kenbak-1 makes debugging challenging.  A program which will test out all instructions, and then more limited programs to hone-in on particular functions are needed.  A set of debugging programs are in the top-level Kenbak-1 web pages.

 

 

 


 

 

section1

section2




Compusaur Home Up
Last Modified : 07/26/07 11:20 PM