Skip to the content
2 layers79.8 × 129.5 mmTtt ttl, the printed circuit board in 3D

An implementation of Tic Tac Toe in TTL logic

Size
79.8 × 129.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
82
Nets
106
Pads
380
Tracks, vias
1,186, 5
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
5 Jun 2019
Updated
28 Jun 2019

Overview

Ttt ttl is an open-source printed circuit board by DoctorWkt, from the DoctorWkt/TTL_TicTacToe repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 79.8 × 129.5 mm with 82 parts on 106 nets, routed with 1,186 tracks and 5 vias.

It is built around the 74LS109PC, 74LS161DC and NE555. Its parts include 33 resistors, 20 diodes, 13 ICs, 11 switches and 3 capacitors.

Main components

3

README

README.md

TTL_TicTacToe

I've seen several circuits for two-player tic-tac-toe games on the Internet, but I thought I'd try to design one with these constraints:

  • done with TTL components only, no CPU
  • minimum number of chips
  • not two player: human versus the board, board makes optimal moves

This is the repository for my result. The circuit uses flip-flops to register both the human and the board's moves. The board has a register which holds the current state of the board's moves. The board state and the user's moves are combined to access a ROM to look up the next board move and any tie or win result. An overview of the design is available. Here's a video of the board in action.

There are several versions of the design.

Logisim Version

I built this Logisim version in preparation for designing the real circuit with TTL components. If you haven't used Logisim before, open up the *.circ file. Now start the clock with a control-K (or use Simulate -> Ticks Enabled). Now that the circuit is running, click on the brown finger icon (the poke tool) at the top-left so that you can press the game buttons.

Over on the right you will see a 3x3 grid. The white squares are the pushbuttons to make a move. Next to each button is a red LED to register the user's move and a blue LED for the board's moves.

Below this grid there is a Reset button and a "Who Goes First" button. Press the "Who Goes First" button to toggle between the user moving first and the board moving first. Then press the Reset button to clear the board.

Now press the user moves buttons to make your moves. Immediately after each move, the board will make a move. When a tie occurs, the Tie LED will light up. When the board wins, the Win LED will light up.

Over on the left are the nine JK flip-flops to record the user's moves, and the nine JK flip-flops to record the board's moves. Below that is the ROM which generates a 4-bit value which is the new board's move. The 4-bit board move goes into the 4:16 demultiplexer to generate the nine lines which go to the nine JK flip-flops to record the board's moves. Two of the 16 possible moves are used to indicate a tie or a board win.

The ROM also generates the next state of the board's moves. This is recorded into a 4-bit register. See the design notes for details of the state number.

The circuit should come with the latest version of the ROM image. If you ever regenerate the ttt.rom file, here is how to load it into the circuit. Right-click on the ROM device in the circuit and choose Load image and choose the ttl.rom file to load.

Kicad Schematic

In the Schematic/ folder you will find a Kicad schematic for the circuit. This uses:

  • nine 74HC107 dual JK flip flops. Each one holds both the user and board move for one position on the board
  • one 28C256 32Kx8 EEPROM to look up the next board move. We only use 8K of the space in the EEPROM.
  • one 74HC154 4:16 demultiplexer
  • one 75HC161 register to hold the board state number
  • one 555 to generate the clock signal
  • various LEDs to show the moves, and other sundry components.

I've also designed a PCB to hold all the components. The design has separate LEDs for user and board moves, but I've chosen to use bi-colour LEDs so that there is a single physical LED for each board position: green for the user, red for the board, off when empty.

Generating the 28C256 EEPROM Contents

At the Linux command-line, run the command:

text
make

This will use the gen_moves.pl script to generate the user-first moves file umoves, and the board-first moves file bmoves. These are then parsed by the parse_moves.pl script to create the ttt.rom file used by Logisim.

Finally, the hex2bin script takes the ttt.rom file, which is hex-encoded, and converts it to the binary file 28C256.bin which can be burned to the EEPROM.

If you have a MiniPro EEPROM burner and the minipro command installed,

text
make write

will burn the 28C256.bin to a 28C256 chip with the MiniPro burner.

Parts

82
QtyValueFootprintReferences
301KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R3, R10, R11, R12, R16, R17, R18, R25, R26, R27, R28, R29, R30, R31 +14
18LEDLED_THT:LED_D3.0mmD1, D2, D3, D4, D5, D6, D7, D10, D11, D12, D13, D14, D15, D16, D17, D18 +2
10SW_PushButton_Switch_THT:Push_E-Switch_KS01Q01SW1, SW2, SW3, SW4, SW5, SW6, SW7, SW8, SW9, SW10
974LS109Package_DIP:DIP-16_W7.62mmU1, U2, U3, U4, U5, U6, U7, U8, U9
2Conn_01x01Connector_Pin:Pin_D1.0mm_L10.0mmJ1, J2
1100KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR41
1100nFCapacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mmC2
110KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR13
110nFCapacitor_THT:C_Disc_D4.7mm_W2.5mm_P5.00mmC1
120KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR42
1220uFCapacitor_THT:CP_Radial_D10.0mm_P2.50mmC3
128C256Package_DIP:DIP-28_W15.24mm_SocketU10
174LS154Package_DIP:DIP-24_W7.62mmU11
174LS161Package_DIP:DIP-16_W7.62mmU13
1DPDTx2Package_DIP:DIP-6_W7.62mmSW11
1NE555Package_DIP:DIP-8_W7.62mmU12
1TIELED_THT:LED_D3.0mmD20
1WINLED_THT:LED_D3.0mmD19

Similar boards

  • 2 layers365.1 × 203.2 mmDIAG, the printed circuit board in 3D

    DIAG

    Nakazoto/CenturionComputer

    This is just a simple backup of all the files related to the Centurion that I have stored on my HD. The Wiki itself has far more in-depth information about the Centurion and it's individual cards.

    150 parts172
  • 2 layers338.7 × 107.7 mmQuapple, the printed circuit board in 3D

    Quapple

    kitspace-test-repos/kicad6-file-collection

    122 partsMIT
  • 2 layersSap be, the printed circuit board in 3D

    Sap be

    kyllikki/eda-designs

    EDA designs

    148 parts32MIT
  • 2 layers624.6 × 303.9 mmSPU2, the printed circuit board in 3D

    SPU2

    rraider/Seminarkurs2021

    Entwicklung eines turingvollständigen, primitiven Microcontroller in der Software Digital

    736 parts7MIT
  • 2 layers135.3 × 106.7 mmAdlib, the printed circuit board in 3D

    Adlib

    schlae/adlib

    Reproduction AdLib Sound Card, OPL2, Circa 1990

    61 parts168
  • 2 layers58.4 × 61.7 mmOpenC64WarpSpeed, the printed circuit board in 3D

    OpenC64WarpSpeed

    SukkoPera/OpenC64WarpSpeed

    Open Hardware Fast Loader cartridge for the Commodore 64 and 128 - DO NOT USE!!!

    19 parts50
  • 2 layers135.3 × 106.7 mmAdLib, the printed circuit board in 3D

    AdLib

    monotech/AdLib

    AdLib clone. Based on schlae's PCB, with some modifications.

    63 parts21
  • 2 layers163.9 × 88.3 mmPlaid bib, the printed circuit board in 3D

    Plaid bib

    schlae/plaid-bib

    A replica of the Ad Lib MCA sound card

    68 parts21

Questions

How big is the Ttt ttl PCB?

It measures 79.8 × 129.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Ttt ttl use?

82 parts, built around the 74LS109PC, 74LS161DC and NE555. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Ttt ttl KiCad files?

From the DoctorWkt/TTL_TicTacToe repository on GitHub, at the commit this page was made from: the board is Schematic/ttt_ttl.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Ttt ttl design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).