Skip to content

Instantly share code, notes, and snippets.

@jessfraz
Last active November 18, 2021 18:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessfraz/94117844cbbcad341f36a296ab140b36 to your computer and use it in GitHub Desktop.
Save jessfraz/94117844cbbcad341f36a296ab140b36 to your computer and use it in GitHub Desktop.
8-bit breadboard computer Kit 2: Registers and ALU

8-bit breadboard computer Kit 2: Registers and ALU

Table of Contents

You’re going to be building the storage for bits of data for the computer.

1. Registers

For the A and B registers, we will use red LEDs and for the instruction register we will use blue and yellow LEDs. The A and B registers will be built on the left side of the breadboard and the intruction register will be built on the right side of the breadboard. This is so that things line up better for the full computer.

1.1. A register

Schematic for the A Register
Figure 1. Schematic: A register

1.1.1. Power wires

Start with a clean breadboard

1.1.1.1. Connect ground -

At the far right side of the breadboard (numbers like 60) connect the two sides of ground - to each other with a wire.

1.1.1.2. Connect power +

At the far right side of the breadboard (numbers like 60) connect the two sides of power + to each other with a wire.

1.1.2. Place our chips

1.1.2.1. 74LS245 8-bit bus transceiver
Note
The 8-bit bus transceiver allows 8-bit data from A (pins 2-9) to B (pins 11-18) or B to A depending on the input to pin 1 (DIR aka DIRECTION). The input for pin 19 (EN aka. ENABLE) disables the device so A and B are isolated.

Place the 74LS245 8-bit bus transceiver on the far left side of the board (number like 3) in the middle of the board such that the two sides are in E and F slots.

1.1.2.2. 74LS173 4-bit D register (1)
Note
The 4-bit D register stores 4 bits. You write data to it by holding G1 and G2 low and pulsating the clock.

Place the first 74LS173 4-bit D register on the left side of our first chip (number like 15) in the middle of the board such that the two sides are in E and F slots.

1.1.2.3. 74LS173 4-bit D register (2)
Note
The 4-bit D register stores 4 bits. You write data to it by holding G1 and G2 low and pulsating the clock.

Place the second 74LS173 4-bit D register on the left side of the first D register chip (number like 25) in the middle of the board such that the two sides are in E and F slots.

1.1.3. Place our LEDs

Select 8 red LEDs.

1.1.3.1. LED (1)

The first LED needs to go from ground - to pin 3 (Q1) of the first 74LS173 4-bit D register

1.1.3.2. LED (2)

The second LED needs to go from ground - to pin 4 (Q2) of the first 74LS173 4-bit D register

1.1.3.3. LED (3)

The third LED needs to go from ground - to pin 5 (Q3) of the first 74LS173 4-bit D register

1.1.3.4. LED (4)

The fourth LED needs to go from ground - to pin 6 (Q4) of the first 74LS173 4-bit D register

1.1.3.5. LED (5)

The fifth LED needs to go from ground - to pin 3 (Q1) of the second 74LS173 4-bit D register

1.1.3.6. LED (6)

The sixth LED needs to go from ground - to pin 4 (Q2) of the second 74LS173 4-bit D register

1.1.3.7. LED (7)

The seventh LED needs to go from ground - to pin 5 (Q3) of the second 74LS173 4-bit D register

1.1.3.8. LED (8)

The eigth LED needs to go from ground - to pin 6 (Q4) of the second 74LS173 4-bit D register

1.1.4. Connect power + and ground - for the chips

1.1.4.1. 74LS245 8-bit bus transceiver
  • Connect pin 1 (DIR) to *power `* -> ` to A

  • Connect pin 20 (5v`)* to *power `+ to J

  • Connect pin 10 (GND) to ground -- to A

1.1.4.2. 74LS173 4-bit D register (1)
  • Connect pin 1 (M) to ground -- to A

    • Connect pin 2 (N) to pin 1 (M)B to B

  • Connect pin 8 (GND) to ground -- to A

  • Connect pin 16 (5v`)* to *power `+ to J

1.1.4.3. 74LS173 4-bit D register (2)
  • Connect pin 1 (M) to ground -- to A

    • Connect pin 2 (N) to pin 1 (M)B to B

  • Connect pin 8 (GND) to ground -- to A

  • Connect pin 16 (5v`)* to *power `+ to J

1.1.5. Connect CLR for the two 74LS173 4-bit D registers

Connect pin 15 (CLR) of the first 74LS173 4-bit D register to pin 15 (CLR) of the second 74LS173 4-bit D registerJ to J

1.1.6. Connect CLK for the two 74LS173 4-bit D registers

Connect pin 7 (CLK) of the first 74LS173 4-bit D register to pin 7 (CLK) of the second 74LS173 4-bit D registerB to B

1.1.7. Connect G1 and G2 for the two 74LS173 4-bit D registers

Connect pin 10 (G1) of the first 74LS173 4-bit D register to pin 10 (G1) of the second 74LS173 4-bit D registerG to G

1.1.7.1. 74LS173 4-bit D register (1)

Connect pin 10 (G1) of the first 74LS173 4-bit D register to pin 9 (G2) of the first 74LS173 4-bit D registerH to H

1.1.7.2. 74LS173 4-bit D register (2)

Connect pin 10 (G1) of the second 74LS173 4-bit D register to pin 9 (G2) of the second 74LS173 4-bit D registerH to H

1.1.8. Connect the two 74LS173 4-bit D registers to the 74LS245 8-bit bus transceiver (A)

1.1.8.1. 74LS173 4-bit D register (2)
  • Connect pin 6 (Q4) of the second 74LS173 4-bit D register to pin 9 (A8) of the 74LS245 8-bit bus transceiver

  • Connect pin 5 (Q3) of the second 74LS173 4-bit D register to pin 8 (A7) of the 74LS245 8-bit bus transceiver

  • Connect pin 4 (Q2) of the second 74LS173 4-bit D register to pin 7 (A6) of the 74LS245 8-bit bus transceiver

  • Connect pin 3 (Q1) of the second 74LS173 4-bit D register to pin 6 (A5) of the 74LS245 8-bit bus transceiver

1.1.8.2. 74LS173 4-bit D register (1)
  • Connect pin 6 (Q4) of the first 74LS173 4-bit D register to pin 5 (A4) of the 74LS245 8-bit bus transceiver

  • Connect pin 5 (Q3) of the first 74LS173 4-bit D register to pin 4 (A3) of the 74LS245 8-bit bus transceiver

  • Connect pin 4 (Q2) of the first 74LS173 4-bit D register to pin 3 (A2) of the 74LS245 8-bit bus transceiver

  • Connect pin 3 (Q1) of the first 74LS173 4-bit D register to pin 2 (A1) of the 74LS245 8-bit bus transceiver

1.1.9. Connect the two 74LS173 4-bit D registers to the 74LS245 8-bit bus transceiver (B)

1.1.9.1. 74LS173 4-bit D register (1)
  • Connect pin 14 (D1) of the first 74LS173 4-bit D register to pin 18 (B1) of the 74LS245 8-bit bus transceiver

  • Connect pin 13 (D2) of the first 74LS173 4-bit D register to pin 17 (B2) of the 74LS245 8-bit bus transceiver

  • Connect pin 12 (D3) of the first 74LS173 4-bit D register to pin 16 (B3) of the 74LS245 8-bit bus transceiver

  • Connect pin 11 (D4) of the first 74LS173 4-bit D register to pin 15 (B4) of the 74LS245 8-bit bus transceiver

1.1.9.2. 74LS173 4-bit D register (2)
  • Connect pin 14 (D1) of the second 74LS173 4-bit D register to pin 14 (B5) of the 74LS245 8-bit bus transceiver

  • Connect pin 13 (D2) of the second 74LS173 4-bit D register to pin 13 (B6) of the 74LS245 8-bit bus transceiver

  • Connect pin 12 (D3) of the second 74LS173 4-bit D register to pin 12 (B7) of the 74LS245 8-bit bus transceiver

  • Connect pin 11 (D4) of the second 74LS173 4-bit D register to pin 11 (B8) of the 74LS245 8-bit bus transceiver

1.1.10. Connect wires that will be external to board

These wires will be more like jumpers that we will connect to other boards.

1.1.10.1. Connect wires to the bus
  • Connect a wire to pin 18 (B1) of the 74LS245 8-bit bus transceiver

  • Connect a wire to pin 17 (B2) of the 74LS245 8-bit bus transceiver

  • Connect a wire to pin 16 (B3) of the 74LS245 8-bit bus transceiver

  • Connect a wire to pin 15 (B4) of the 74LS245 8-bit bus transceiver

  • Connect a wire to pin 14 (B5) of the 74LS245 8-bit bus transceiver

  • Connect a wire to pin 13 (B6) of the 74LS245 8-bit bus transceiver

  • Connect a wire to pin 12 (B7) of the 74LS245 8-bit bus transceiver

  • Connect a wire to pin 11 (B8) of the 74LS245 8-bit bus transceiver

1.1.10.2. Connect wire to the LOAD signal

Connect a wire to pin 9 (G2) of the second 74LS173 4-bit D register

1.1.10.3. Connect wire to the ENABLE signal

Connect a wire to pin 19 (EN) of the 74LS245 8-bit bus transceiver

1.1.10.4. Connect wire to the RESET signal

Connect a wire to pin 15 (CLR) of the second 74LS173 4-bit D register

For now we can connect the other end of this wire to ground - because we don’t want to use it right now

1.1.10.5. Connect wire to the CLOCK signal

Connect a wire to pin 7 (CLK) of the second 74LS173 4-bit D register

1.2. B Register

Schematic for the B Register
Figure 2. Schematic: B register

Use the same instructions for the A register and repeat for the B register. This register is the exact same as the A register.

1.3. Instruction register

Schematic for the Instruction Register
Figure 3. Schematic: Instruction register

Use the same instructions for the A register but mirror them on the breadboard such that it is aligned on the right side of the board versus the left. This will help us put all the boards together in the end.

1.4. Testing our registers

1.4.1. Create a testing LED breadboard

  • On another breadboard line up 8 LEDs

  • * Connect one side of each LED to *ground (-) and one side to the inner board

  • Connect each of the wires for the bus on our register to each of the LEDs

  • Connect ground (-) on the register breadboard to ground (-) on the LED breadboard

1.4.2. Set ENABLE to high

Plug the other side of the ENABLE wire on the register into power (+)

1.4.3. Set LOAD to high

Plug the other side of the LOAD wire on the register into power (+)

1.4.4. Connect to our CLOCK breadboard

  • Connect the CLOCK wire from the register breadboard to the CLOCK breadboard we made in Kit 1.

  • Connect power (`)* and *ground (`-`)* from the register breadboard to *power (`) and ground (-) on the CLOCK breadboard

1.4.5. Turn on the register breadboard

Plug our power source into our register breadboard. Now the boards should be powered.

1.4.6. Bring LOAD from high to low

By doing this, we are telling our register to load whatever is on the bus.

The next time the CLOCK goes high, all the bits in our register should go high. Meaning all the LEDs on the register should illuminate.

Note
The chip defaults to high. This is why, even though we have nothing on our bus, the bits on the register go to high.

1.4.7. Bring LOAD (pin 9) from low to high

This turns the load off, so we will no longer load the value from the bus.

1.4.8. Bring ENABLE (pin 19) from high to low

This enables the register. The output from the register should now populate to the bus (our external breadboard with LEDs).

Note
If you want to have some bits set to 0, connect some of the LEDs to ground. And repeat all these steps again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment