The TTL-Retro Computer Project

MTM Scientific, Inc

Working setup for the TTL-Retro Computer

The TTL-Retro Computer Project was started after reading a book by Per  Brinch Hansen: "Programming a Personal Computer". I was also intriqued by writings of Nikolaus Wirth about the Pascal programming language. The unique properties and simplicity of stack machine computers started my search for a suitable hardware platform for experimentation. I found a good summary of historical stack machines in a book by Philip Koopman: "Stack Computers, The New Wave", however obtaining off-the-shelf stack machine hardware was found to be quite challenging.

Several historical papers on the architecture, operation and hardware design of simple computers encouraged my consideration of building a stack machine computer from discrete components. Notably a paper by Bradford Rodriquez: "A Minimal TTL Processor for Architecture Exploration", and a paper by Richard Eckert: "Micro-Programmed Versus Hardwared Control Units: How Computers Really Work". Of these two papers, I found the Eckert description of simple a computer architecture to be especially amenable to construction and modification for my purposes to create a stack machine.

Common to both simple computer descriptions was the use of an off-the-shelf Arithmetic Logic Unit (ALU), the 74LS181. Although obsolete, this particular IC has the wonderful ability to perform useful mathematical and logical operations while being controlled using TTL logic. The 74LS181 ALU is easily sourced on the secondary IC markets, such as EBAY.

Eckert Computer Architecture
Figure 1. Eckert Computer Architecture

In Figure 1, The components shown are as follows: PC is the Program Counter, MAR is the Memory Address Register, RAM is Random Access Memory (which can be RAM and ROM), MDR is the Memory Data Register, ACC is the ALU Accumulator, ALU is the Arithmetic Logic Unit, B is the 2nd ALU Register, IR is the Instruction Register and CONTROL is the Hardware Control Matrix. We have annotated the original diagram with additional information for clarity, as shown in Figure 2. We have added a hardware stack to this architecture, which will be described separately.

Annotated Eckert Computer Diagram
Figure 2. Annotated Eckert Computer Architecture

In the basic implementation of the computer architecture described by Eckert, there is a 12 bit bus consisting of 8 data bits and 4 opcode bits. The computer has 8 instructions and a cyclic ring counter to provide 6 sequential trigger pulses. There are a total of 16 controls signals for controlling the individual IC's.  I combined these functions with the CLK (Clock), RST (Reset), GND (Ground) and +5V lines to create a 50 channel breadboard bus. This arrangement provided 4 unassigned channels for future development purposes.

Eckert Computer PCB Backplane
Figure 3. Eckert Computer Backplane PCB

The breadboard backplane to implement the Eckert Computer is shown in Figure 3. The design stategy was to make a basic backplane into which individual breadboarding cards could be inserted, tested and modified during the development phase. Since this platform is intended for development, the backplane includes LED logic level indication of all 50 channels of the bus. Also included is a manual toggle switch for single-stepping the bus clock.

Individual functional components of the computer architecture reside on individual cards. A partially assembled computer is shown in Figure 4. A card was created especially for the purpose of doing prototype circuit development. Also shown in Figure 3 is a view of the Ring Counter card.

Backplane with cards inserted
Figure 4. Computer Backplane with Cards

The ALU card is shown in Figure 5. We have annotated the functions of the individual ICs for clarity. The ALU chips are combinatorial logic... they are NOT clocked. Therefore, special care and thought are required for the A and B register timings. The 74181 ALU chips are available in 2 different package sizes, 0.300" and 0.600" width. Note that we have used the narrow packages to keep the PCB layout more compact. We found it convenient to add functional operative points on the ALU card for loading and enabling the A register. We also added LED indicators for the 4 least significant bits of the A register.

View of the ALU card
Figure 5. The ALU card

The memory card was especially challenging to design because the MDR (Memory Data Register) must transfer data in both directions. This function is available in the 74F543 Octal Registered Transceiver. We forgot to tie the unused address lines on the SRAM to a stable logic state, which is why the resistors are present in the photo of Figure 6. (This condition exhibits as intermittent faults and was very difficult to troubleshoot!) Because of possible race conditions between the registers and SRAM we used a TTL delay line for some of the enable signals. The LEDs were added as an easily visible indicator of bus conditions on the board.  We added some capacitance to the power supply line as a precaution, but during the early phases of development the clock speed has been very slow... only a few hertz. Note that the Memory Card was designed to also accept ROM programmable memory in the wide DIP packages, and eventually we will install ZIF sockets for easy switching.

Memory Board
Figure 6. The Memory card

We found it was challenging to do the initial checkout of individual board functions because of the tendency of TTL inputs to drift up to a weak logic 'high' level. Therefore we created a special board for the bus which tie all lines to a logic level 'low' using an array of resistors.  We found that generally a 1K resistor was sufficient to pull lines to Logic "0". However, in the case of the ALU we found the S0, S1, S2, S3 function control lines had a high internal fanout and nearly 100 ohms of resistance was required. This was also a difficult problem to find troubleshooting, and ran contrary to expectations for a packaged TTL IC.

Bus Termination Board
Figure 7. Bus Termination Card

Complete Eckert Computer Prototype
Figure 8. Complete Prototype Eckert Computer

The original paper by Eckert is quite specific about the sequence of digital signals sent to control various operations, such as enabling signals on the bus and loading signals from the bus. We found that enabling and loading signals to the bus at the same time created undesirable race conditions. To avoid race conditions we implemented a short 50 ns delay in the loading operations by using EP9206-50 delay ICs. We took this approach to preserve the original design as closely as possible.

The boards were designed using the free design software from Express PCB.  We have used this software for PCB design for about 15 years and have been very happy with it. There is also a companion program available for creating circuit schematics. Most of the IC components have been purchased on the secondary market, such as EBAY.

We found installing indicator LEDs for many of the digital signal lines was invaluable. We also made a habit of labeling vias with the name of the signal, which made for very convenient test points using a multimeter probe. Placing the separate computer functions on individual cards was especially helpful for testing. This approach also allows individual cards to be revised and improved without affecting the other cards.  We intend to implement a stack using the same approach.

Input/Output communication with the computer remains a work in development. An APPLE II keyboard can be used to put ASCII characters on the bus. The computer polls the keyboard looking for a key press. The keyboard output provides 8 bits in parallel. (The top bit indicates if a key press is new.) The keyboard masters the bus and sends data when it receives the appropriate signal from the computer.

It is also possible to communicate with the computer using a laptop computer running a serial communcation program. We have found the program "Termite" works well for this purpose. A special interface card was designed which uses a Picaxe-20X2 microcontroller. The microcontroller handles the logic of sending ASCII characters to-and-fro to a serial port on the laptop. Our eventual goal is to eliminate the laptop and build a TTL display card. Here is a photo of the interface card.

Serial Card for communication with the laptop

Figure 9. Card for Serial Communication to Laptop

Presently we are in the process of writing an assembler that is hosted on the TTL computer. This is the classical idea of bootstrapping the operating system.  The instruction list for the computer has undergone extensive revision during the development phase. The instruction list was recently expanded with the addition of true 4-16 decode on the controller. Here is a partial list of mnemonics and their explanation.  All mnemonics are 3 characters. Instructions operate primarily on A, sometimes on A and B, and occasionally only on B. There are multiple conditional jumps available: including equality, relational and sign. (Not shown) The conditonal jumps do not require a Compare instruction to set flags. The flags are set in real time using combinatorial circuitry on the ALU. A complete explanation of the language will be provided when the assembler is finished, as it is a work in progress. All these instructions are primitives, and execute in a single instruction cycle. We chose these mnemonics in an effort to make the assembly language appear somewhat like a terse higher level language. Here is a partial list:

Mnemonic Description
LAZ Load A with Zero
INC Increment A
MAB Move A to B
ADD Add A and B
OUT OUT A to Bus
POP POP from Stack
PSH PUSH to Stack
ASL Arithmetic Shift Left
DEC Decrement A
JLA Jump Loading A
INA IN A from Bus
NOP No Operation
NAN NAND of A with B
XOR XOR of A with B
AND AND of A with B
ORR OR of A with B
MBB Move B back to A
NTB NOT B (Result to A)
SUB Subtraction A-B
SEG Segment Memory Jump
PCA Program Counter to A

The TTL computer design includes a hardware stack option. We have designed the stack interface such that multiple stacks can be added to the bus. For example, by adding 2 stack cards the computer can have a Data Stack and a Return Stack. We will be saying more about this in the future.

The TTL-Retro Computer System consists of the following cards as of August, 2021:
1) Backplane, Motherboard Card, 9 Slots with LED indicators on 50 bus lines, Rev B
2) LCD Display Card, uses 1602A Display Module,  Rev B
3) Memory Carrier Card, 64K ROM and SRAM, 256 Segments of 256 Memory Locations each, Rev D
4) Controller Card, Decodes Instructions and Controls Hardware, "TTL hardwired CPU", Rev D Longer
5) ALU & Latches Card, Uses 3pcs 74F181 ALU, 12 bits, Rev. M
6) Ring Counter Card (Creates pulses T0,T1,T2,T3,T4 and T5), 555 Timer Bus Clock, Rev D
7) Program Counter Card, 8 bit output to bus, Rev C (Eventually hope to combine cards 6 & 7)
8) Hardware Data Stack Card, Rev. B
9) Hardware Return Stack Card, Rev. B
10) Apple II Keyboard Adapter Card, Rev. A
11) Picaxe I/O Card, Uses a  PICAXE-20X2 for Bus Monitoring and Serial Port I/0, Rev B

Here is a link to a Zip file containing the PCB design files for all of the cards mentioned in the above list. These files were created using the ExpressPCB application, which is available for free download at the company website. TTL-Retro PCB Design Files

Here is a link to a Zip file containing the PCB design files for the cards in Gerber format, which is useful for ordering. TTL-Retro PCB Gerber Files

The memory organization of the TTL-Retro is unique. There are 256 memory segment of 256 Tribbles each. Each memory segment is divided into 128 Tribbles of ROM (lower 0-127) and 128 Tribbles of SRAM (upper 128-255). The segment 0 is the home segment. Information sharing between segments is accomplished by using the dual stacks.  The ROM memory locations are programmed with code. The code is generated using a hex file editor and a simple Excel-based assembler running a simple substitution formula. The formula converts the 3 letter instruction mnemonics into equivalent Hex code. Because ROM and SRAM memory is not widely available for holding 12 bit wide data, we use dual chips capable of holding 16 bits. (The upper 4 bits are not used in ROM B.)  The code placed in ROM can be considered to be a combination of BIOS, Operating System, Assembler, Debugger and Interpreter.

Excel Assembler for TTL-Retro

Here is a photo of the cards comprising the computer as of September, 2020.

Computer Cards as of September, 2020

Resource List:

The paper by Eckert which forms the basis for this project. I am using the hardwired version of the controller.

The paper by Rodriguez that describes using the 74181 ALU in a homebrew 'PISC' computer.

The book by Koopman about Stack Computers, available online.

A webpage by Sukuba with an excellent description of a 4-bit homebrew CPU.

A book by Joseph D. Greenfield which describes construction and operation of a small computer very similar to the design discussed here: "Practical Digital Design Using ICs", 2nd edition, 1983. See especially Chapter 16. This is a great book!

Questions or Comments: Please email us at