Ben Eater's Homebuilt Computer

Individual journals about topics not specifically related to hang gliding.

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:36 pm

Output Register

In order to translate binary values into 7-Segment Display inputs, Ben built an EEPROM programmer using an Arduino.

https://www.youtube.com/watch?v=K88pgWhEb1M
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:36 pm

Output Register

In this video Ben shows how to use a single 2K EEPROM to decode from binary output to decimal. The EEPROM is multiplexed to output the segments for each digit.

https://www.youtube.com/watch?v=dLh1n2dErzE
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:36 pm

Bringing it all Together

In this video Ben builds the output register, builds the data bus, and begins connecting modules together through the data bus.

The output register will hold the value being displayed. This will be similar to the other registers, but doesn't need to put anything out on the bus. So it won't need the 74LS245 used in other registers. Ben uses a 74LS273 chip containing 8 D flip flops as the register's memory. An additional AND gate is needed to combine the system clock with the enable signal for synchronous operation.

After building the output register, Ben builds the actual data bus and connects various modules to it. Ben adds 8 LEDs to show what's on the bus.

With the modules connected to the bus, Ben is able to manually exercise each module and its interactions with the other modules.

https://www.youtube.com/watch?v=-6JAgFWCL9w
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:36 pm

Bringing it all Together

In this video, Ben routes the various control signals from each module down to a central control area where the signals can be both displayed and controlled. To make operation easier, Ben inverts all of the active low signals so that each control signal is on when active.

https://www.youtube.com/watch?v=AwUirxi9eBg
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:37 pm

CPU Control Logic

In this video Ben begins working on the actual control logic.

Ben starts out by manually executing various operations required to perform a simple program. This leads to the definition of operation codes for performing each instruction. Ben emphasizes that he can make up whatever commands (operation codes and instruction mnemonics) that he wants.

Ben defines several command instructions and programs them into memory. Then he manually works his way through the program by sequentially setting the control signals needed to carry out each instruction. Ben also manually controls the clock to step through what needs to happen for each instruction. This leads to the definition of the microcode that will carry out each individual instruction.

https://www.youtube.com/watch?v=dXdoim96v5A
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:37 pm

CPU Control Logic

In this video, Ben begins to demonstrate microcoding. Ben begins by reviewing the manual process that will be automated.

Ben uses a 74LS161 counter to clock the microinstructions needed for each (macro) instruction. Ben inverts the system clock to use for clocking the microcode. Ben uses a 74LS138 to decode the microcode clock into the individual microcode step signals.

Ben wires up a few of the microcode instructions to demonstrate how it works.

https://www.youtube.com/watch?v=X7rCxs1ppyY
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:37 pm

CPU Control Logic

In this video, Ben replaces the temporary control logic with a mapping from the CPU state to the control signals needed at that CPU state.

Ben builds a table of the CPU states and associated microcode for each step in each command. He implements this table using two 28C16 EEPROMs to map the CPU states into microcode commands to the control lines. The CPU states will be connected to the address lines of the EEPROMs and the data lines of the EEPROMs will be connected to the control signal lines.

Ben uses his manual EEPROM programmer to program the microcode for the 4 instructions of his first simple program (LDA, ADD, OUT, HALT). Then Ben is able to single step his way through the program at the microcode level to verify that it works. Eventually Ben is able to run his first real program:

LDA
ADD
OUT
HALT


Here's the video:

https://www.youtube.com/watch?v=dHWFpkGsxOs
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:37 pm

CPU Control Logic

In this video Ben adds a reset button to bring the computer back to its initial state.

Ben also describes how he powers the computer with various USB power supplies. The computer draws just over 1 amp, so a 2 amp USB supply is best.

Ben also reviews the breadboard that he uses (Busboard Prototype Systems BB830).

https://www.youtube.com/watch?v=HtFro0UKqkk
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:37 pm

CPU Control Logic

In this video Ben uses his Arduino EEPROM programmer to expand the instruction set in the microcode to include a subtract instruction. Ben demonstrates the new instruction by computing
5 + 6 - 7 to get 4.

https://www.youtube.com/watch?v=JUVt_KYAp-I
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Ben Eater's Homebuilt Computer

Postby Bob Kuczewski » Sat Nov 19, 2022 8:38 pm

CPU Control Logic

In this video Ben will add three more instructions to the computer by adding more microcode:

Store A - STA
Load Immediate - LDI
Jump - JMP

Ben uses these new instructions to write a simple program that counts by 3.

https://www.youtube.com/watch?v=FCscQGBIL-Y
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
User avatar
Bob Kuczewski
Contributor
Contributor
 
Posts: 8515
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

PreviousNext

Return to Non-HG Blogs

Who is online

Users browsing this forum: No registered users and 5 guests