Difference between revisions of "Classes/Building an 8-Bit CPU from Scratch"

From Pumping Station One
Jump to navigation Jump to search
 
(19 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
| date = May 27, 2017
 
| date = May 27, 2017
 
| est_time = 16 Weeks
 
| est_time = 16 Weeks
| est_cost = $40
+
| est_cost = $75
 
| in_development = Yes
 
| in_development = Yes
 
| is_project = Yes
 
| is_project = Yes
Line 38: Line 38:
 
== Prerequisites ==
 
== Prerequisites ==
  
There are minimal prerequisites to attend this class.  No prior experience in electronics is needed, nor any experience with soldering or computers.  It is important that novices to these are attend the first classes and to make use of office hours to ask questions before continuing into more advanced topics.
+
There are minimal prerequisites to attend this class.  No prior experience in electronics is needed, nor any experience with soldering or computers.  It is important that novices attend the first classes, and make use of office hours, to ask questions before continuing on to more advanced topics.
  
 
=== Materials ===
 
=== Materials ===
  
Components and tools will be made available for persons who wish to learn, but do not wish to keep their project after class completionIf parts are borrowed from the electronics space, it is asked that a donation be made, at your discretion, to the [[:Category:Electronics|Electronics Lab]] area hostNote that you will be required to return all components used for the class after the course is completed.  Persons borrowing equipment will be required to pair with others doing the same, if enough persons are available.
+
Components will be group-purchased before each class to ensure proper components are bought, and to keep prices down.  As such, the cost of materials can vary, depending on how many people are in class.  While some materials are available in the electronics space, such assumptions should be taken with cautionYou don't want to miss a class because the component you need isn't available!
 
 
If you, however, wish to keep your project, or want to extend it further after the course is complete (both highly recommended), the following will need to be purchased:
 
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 54: Line 52:
 
==== Components ====
 
==== Components ====
  
The following components are required to build the CPU project.  No components are "consumed" by this project, as long as it is built on a breadboard; so, if you so choose, you may reuse these components in future projects.  A bulk-purchase option is given to students at the beginning of each class, which serves to reduce costs.  The average cost, per-student, when bulk-purchasing all-new components is generally about $TBD.
+
The following components are required to build the CPU project.  No components are "consumed" by this project, as long as it is built on a breadboard; so, if you so choose, you may reuse these components in future projects.  A bulk-purchase option is given to students at the beginning of each class, which serves to reduce costs.  The average cost, per-student, when bulk-purchasing all-new components is generally about $TBD.  Prices last updated May 31, 2017.
  
 
{| class="wikitable sortable" style="width: 75%; min-width: 350px; margin: 25px auto;"
 
{| class="wikitable sortable" style="width: 75%; min-width: 350px; margin: 25px auto;"
 +
! Category
 +
! Cost<br/><small>(Individual)</small>
 +
! Cost<br/><small>(Class Rate)</small>
 
! Quantity
 
! Quantity
 
! Component
 
! Component
 +
! Type
 +
! Modules Used
 
|-
 
|-
 +
! rowspan="2" | Base
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | --
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | --
 
| style="text-align: center;" | 1
 
| style="text-align: center;" | 1
| [http://amzn.to/2qqAGFi 22AWG Solid Wire Kit], Various Colors (see below)
+
| colspan="2" | [http://amzn.to/2qqAGFi 22AWG Solid Wire Kit], Various Colors (see below)
 +
| All
 
|-
 
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $38.76
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $38.76
 
| style="text-align: center;" |  14
 
| style="text-align: center;" |  14
| [http://amzn.to/2s1DxWp Full-Sized (830-Point) Breadboards]<sup>&dagger;</sup>
+
| colspan="2" | [http://amzn.to/2s1DxWp Full-Sized (830-Point) Breadboards]<sup>&dagger;</sup>
 +
| All
 +
|-
 +
! rowspan="6" | Resistors
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.80
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.18
 +
| style="text-align: center;" | 8
 +
| [https://www.digikey.com/product-detail/en/stackpole-electronics-inc/CF14JT470R/CF14JT470RCT-ND/1830342 470Ω Resistor]
 +
| ¼W, ±5% Tolerance
 +
| Clock, RAM, Display
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.90
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.20
 +
| style="text-align: center;" | 9
 +
| [https://www.digikey.com/product-detail/en/stackpole-electronics-inc/CF14JT1K00/CF14JT1K00CT-ND/1830350 1kΩ Resistor]
 +
| ¼W, ±5% Tolerance
 +
| Bus
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.80
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.18
 +
| style="text-align: center;" | 8
 +
| [https://www.digikey.com/product-detail/en/stackpole-electronics-inc/CF14JT10K0/CF14JT10K0CT-ND/1830374 10kΩ Resistor]
 +
| ¼W, ±5% Tolerance
 +
| Clock, Display
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.20
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.08
 +
| style="text-align: center;" | 2
 +
| [https://www.digikey.com/product-detail/en/stackpole-electronics-inc/CF14JT100K/CF14JT100KCT-ND/1830399 100kΩ Resistor]
 +
| ¼W, ±5% Tolerance
 +
| Bus
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.10
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.04
 +
| style="text-align: center;" | 1
 +
| [https://www.digikey.com/product-detail/en/stackpole-electronics-inc/CF14JT1M00/CF14JT1M00CT-ND/1830423 1MΩ Resistor]
 +
| ¼W, ±5% Tolerance
 +
| Clock
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $2.48
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $2.18
 +
| style="text-align: center;" | 1
 +
| [https://www.digikey.com/product-detail/en/bourns-inc/3386F-1-105TLF/3386F-1-105TLF-ND/2536915 1MΩ Potentiometer]
 +
| ½W
 +
| Clock
 +
|-
 +
! rowspan="3" | Capacitors
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.90
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.65
 +
| style="text-align: center;" | 6
 +
| [https://www.digikey.com/product-detail/en/vishay-bc-components/K103K10X7RF5UH5/BC2662CT-ND/2356876 0.01µF Capacitor]
 +
| Ceramic, ±10% 50V
 +
| Clock, RAM, Display
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.36
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.27
 +
| style="text-align: center;" | 2
 +
| [https://www.digikey.com/product-detail/en/vishay-bc-components/K104K10X7RF5UH5/BC2665CT-ND/2356879 0.1µF Capacitor]
 +
| Ceramic, ±10% 50V
 +
| Clock
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.75
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.55
 +
| style="text-align: center;" | 1
 +
| [https://www.digikey.com/product-detail/en/avx-corporation/TAP105K035SRW/478-8041-1-ND/3900657 1µF Capacitor]
 +
| Conformal Coated, ±10% 35V
 +
| Clock
 +
|-
 +
! rowspan="17" | Integrated Circuits
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $1.64
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $1.33
 +
| style="text-align: center;" | 4
 +
| [https://www.digikey.com/product-detail/en/fairchild-on-semiconductor/LM555CN/LM555CNFS-ND/458696 LM555CN]
 +
| Timer
 +
| Clock, Display
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $1.14
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $1.02
 +
| style="text-align: center;" | 1
 +
| [https://www.digikey.com/product-detail/en/texas-instruments/SN74LS00N/296-1626-5-ND/277272 74LS00]
 +
| Quad NAND Gate
 +
| RAM
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $3.45
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $3.06
 +
| style="text-align: center;" | 5
 +
| [https://www.digikey.com/product-detail/en/texas-instruments/SN74LS04N/296-1629-5-ND/277275 74LS04]
 +
| Hex Inverter
 +
| Clock, RAM, Controller
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $1.26
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $1.11
 +
| style="text-align: center;" | 2
 +
| [https://www.digikey.com/product-detail/en/texas-instruments/SN74LS08N/296-1633-5-ND/277279 74LS08]
 +
| Quad AND Gate
 +
| Clock, Display
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.59
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $0.59
 +
| style="text-align: center;" | 1
 +
| [https://www.digikey.com/product-detail/en/texas-instruments/SN74LS32N/296-1658-5-ND/277304 74LS32]
 +
| Quad OR Gate
 +
| Clock
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 1
 +
| 74LS76
 +
| Dual JK Flip-Flop
 +
| Display
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 1
 +
| 74LS86
 +
| Quad XOR Gate
 +
| ALU
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 1
 +
| 74LS138
 +
| 3-to-8 Line Decoder
 +
| Controller
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 1
 +
| 74LS139
 +
| Dual 2-Line to 4-Line Decoder
 +
| Display
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 4
 +
| 74LS157
 +
| Quad 2-to-1 Line Data Selector
 +
| RAM
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 4
 +
| 74LS161
 +
| 4-bit Synchronous Binary Counter
 +
| Program Counter, Controller
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 7
 +
| 74LS173
 +
| 4-bit D-Type Register
 +
| Register, RAM
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 2
 +
| 74LS189
 +
| 64-bit Random Access Memory
 +
| RAM
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 6
 +
| 74LS245
 +
| Octal Bus Transceiver
 +
| Register, ALU, Ram, Program Counter
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 1
 +
| 74LS273
 +
| Octal D Flip-Flop
 +
| Display
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 2
 +
| 74LS283
 +
| 4-bit Binary Full Adder
 +
| ALU
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 4
 +
| colspan="2" | 28C16 EEPROM
 +
| Display, Controller
 +
|-
 +
! rowspan="4" | Switches
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 2
 +
| Double-Throw Toggle Switch
 +
| 8mm, DPDT, Latching
 +
| Clock, RAM
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 2
 +
| Momentary Tactile Switch
 +
| 6mm, Normally-Open
 +
| Clock, RAM
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 1
 +
| colspan="2" | 8-Position DIP Switch
 +
| RAM
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 1
 +
| colspan="2" | 4-Position DIP Switch
 +
| RAM
 +
|-
 +
! rowspan="5" | LEDs
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 41
 +
| Red LED
 +
| 3mm, 1.8-2.3V, 20mA
 +
| Bus, Register, ALU, RAM
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 20
 +
| Yellow LED
 +
| 3mm, 1.8-2.3V, 20mA
 +
| Register, RAM, Controller
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 11
 +
| Green LED
 +
| 3mm, 2.8-3.6v, 20mA
 +
| Ram, Program Counter, Controller
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 22
 +
| Blue LED
 +
| 3mm, 2.8-3.6v, 20mA
 +
| Clock, Register, Controller
 +
|-
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: right; font-family: Courier New, Courier, fixed-width;" | $
 +
| style="text-align: center;" | 4
 +
| 7-Segment Display
 +
| Common-Cathode, 10-Pin, 2mm Pin Pitch
 +
| Display
 
|}
 
|}
 +
<small style="display: block; width: 75%; min-width: 350px; margin: 25px auto;"><i><sup>&dagger;</sup> For advanced participants familiar with soldering, [http://amzn.to/2s1W7xR StripBoard] can be used instead to save space and money (about $30 in savings).  Do note, however, that soldering and organization of these boards will not be covered in the class, and if chosen by the student, will need to be managed themselves.  Using such boards can also make debugging and modification significantly more time-consuming and difficult.  If using StripBoard, ensure that the board's [[Wikipedia:List of integrated circuit packaging types#Dimension_reference|pin pitch]] is the standard breadboard size of 0.1" (2.54mm).</i></small>
  
<small><i><sup>&dagger;</sup> For advanced students, [http://amzn.to/2s1W7xR StripBoard] can be used instead to save space and money (about $30 in savings).  Do note, however, that soldering and organization of these boards will not be covered in the class, and if chosen by the student, will need to be managed themselves.  Using such boards can also make debugging and modification significantly more time-consuming and difficult.  If using StripBoard, ensure that the board's [[Wikipedia:List of integrated circuit packaging types#Dimension_reference|pin pitch]] is the standard breadboard size of 0.1" (2.54mm).</i></small>
+
===== Wire Color Guide =====
 
 
===== Wire Colors =====
 
  
 
Wire colors are used for the following, so please ensure any kit you buy contains enough of each.  Wire may be available in the Electronics Lab, but gauge and color cannot be guaranteed:
 
Wire colors are used for the following, so please ensure any kit you buy contains enough of each.  Wire may be available in the Electronics Lab, but gauge and color cannot be guaranteed:
Line 101: Line 357:
 
{| class="wikitable sortable" style="width: 75%; min-width: 350px; margin: 25px auto;"
 
{| class="wikitable sortable" style="width: 75%; min-width: 350px; margin: 25px auto;"
 
! Tool
 
! Tool
! Estimated Cost
 
 
! Details
 
! Details
 
|-
 
|-
 
| [http://amzn.to/2qqmKLM Flush Diagonal Cutters]
 
| [http://amzn.to/2qqmKLM Flush Diagonal Cutters]
| style="text-align: right;" | $8.00
 
 
| Used to cut wire and trim pins flush to a surface.  Very useful for any electronics project.
 
| Used to cut wire and trim pins flush to a surface.  Very useful for any electronics project.
 
|-
 
|-
 
| [http://amzn.to/2qqja3Z Self-Adjusting Wire Strippers]
 
| [http://amzn.to/2qqja3Z Self-Adjusting Wire Strippers]
| style="text-align: right;" |  $16.00
 
 
| Used to trim the ends of wire sheathing (which we do a lot).  [http://amzn.to/2ra2JMF Simpler strippers] exist, if you wish to save money.
 
| Used to trim the ends of wire sheathing (which we do a lot).  [http://amzn.to/2ra2JMF Simpler strippers] exist, if you wish to save money.
 
|-
 
|-
 
| [http://amzn.to/2s21hKk Multimeter] <br/><small style="white-space: nowrap;">with Standard ''and'' Alligator-Clip Probes</small>
 
| [http://amzn.to/2s21hKk Multimeter] <br/><small style="white-space: nowrap;">with Standard ''and'' Alligator-Clip Probes</small>
| style="text-align: right;" |  $20.00
 
 
| Used to measure voltages, amperage, continuity, and generally debug problem circuits.  Given the basic nature of this project, a high-precision multimeter is <i>not</i> necessary
 
| Used to measure voltages, amperage, continuity, and generally debug problem circuits.  Given the basic nature of this project, a high-precision multimeter is <i>not</i> necessary
 
|-
 
|-
 
| Oscilloscope
 
| Oscilloscope
| style="text-align: right;" |  -
 
 
| Used to debug and optimize circuits.  We will use the Oscilloscopes in the Electronics Lab.
 
| Used to debug and optimize circuits.  We will use the Oscilloscopes in the Electronics Lab.
|-
 
! style="text-align: right;" | TOTAL
 
! style="text-align: right;" | $44.00
 
! style="text-align: left; font-size: 8pt; font-weight: normal;" | ''Note that these prices are not included in the overall estimate above, as all of this equipment is available, free-to-use, in the lab.  This list is purely for your convenience.''
 
 
|}
 
|}
  
Line 139: Line 386:
 
Classes are held weekly, and build on top of each other.  It is important that all classes are attended, or completing the CPU will be very difficult.  Office hours are made available prior to every class to allow persons who miss classes to catch up prior to starting a new lesson.
 
Classes are held weekly, and build on top of each other.  It is important that all classes are attended, or completing the CPU will be very difficult.  Office hours are made available prior to every class to allow persons who miss classes to catch up prior to starting a new lesson.
  
=== Week 1 - Digital Electronics Fundamentals ===
+
=== Prep Session: Electronics Fundamentals ===
 +
 
 +
Prior to getting into the course syllabus, an hour-long session will be hosted for anyone who is new to electronics.  Nothing needs to be purchased for this class, and there is no maximum for the number of people who may attend.  It is not required for someone interested in this prep class to be registered for the following 8-Bit CPU course - it is open to all members every time it is offered.
 +
 
 +
This course is not required for members already experienced with electronics in order to be successful with the remaining courses in the class.
 +
 
 +
==== Topics ====
 +
 
 +
By way of introduction into digital electronics, the prep class will dive into certain fundamental knowledge that is necessary for work on any circuit.  The following topics will be covered:
 +
 
 +
* Basic overview of common components and parts, where they are used, and how they work
 +
* Basic overview of how circuits work (the [[Wikipedia:Hydraulic Analogy|Hydraulic Analogy]])
 +
* [[Wikipedia:Alternating Current|Alternating-Current]] (AC) vs. [[Wikipedia:Direct Current|Direct-Current]] (DC)
 +
* Different methods of powering circuits on a breadboard
 +
* Building our first circuit - let there be light!
 +
* [[Wikipedia:Kerckhoffs's principle|Kerckhoffs's Principle]] - AKA, how not to light your breadboard on fire
 +
* Introduction to [[Wikipedia:Resistor|resistors]]
 +
* Introduction to [[Wikipedia:Switch|switches]]
 +
* The [[Wikipedia:Multimeter|multimeter]], measurement, and calculations
 +
** <span style="font-family: Courier New, Courier, fixed-width;">[P]</span> Power; [[Wikipedia:Watt|Watt]] (KW, W, mW)
 +
** <span style="font-family: Courier New, Courier, fixed-width;">[I]</span> Amperage; [[Wikipedia:Ampere|Ampere]] or Amp (KA, A, mA, μA))
 +
** <span style="font-family: Courier New, Courier, fixed-width;">[V]</span> Voltage; [[Wikipedia:Volt|Volt]] (KV, V, mV, μV)
 +
** <span style="font-family: Courier New, Courier, fixed-width;">[R]</span> Resistance; [[Wikipedia:Ohm|Ohm]] (MΩ, KΩ, Ω)
 +
* The Mystery Signal™ - learning how to debug a circuit
 +
* Introduction to diodes and transistors
 +
* Introduction to integrated circuits
 +
 
 +
After the lesson, students will receive an [[File:Electronics_Cheat_Sheet.pdf|Electronics Cheat Sheet]] for their reference throughout the rest of the course.
 +
 
 +
==== After the Class ====
 +
 
 +
Office hours are held for up to an hour after the class concludes.  This is an open-forum time period in which questions can be asked and answered.  Optionally, students can also choose between these more-advanced topics, if they wish to learn more about the topics from the class' discussion:
 +
 
 +
* Ideal components vs. reality
 +
* The physics behind how Diodes and Transistors work
 +
* The wide, wide world of components, and choosing the right one for your circuit
 +
* Different types of switches
 +
* Different types of resistors
 +
 
 +
=== Week 01 - Implementing Logic with Transistors ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 147: Line 433:
 
|}
 
|}
  
=== Week 2 - Implementing Logic with Transistors ===
+
=== Week 02 - The CPU Clock Module ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 155: Line 441:
 
|}
 
|}
  
=== Week 3 - The CPU Clock Module ===
+
=== Week 03 - The 8-Bit Register Modules ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 163: Line 449:
 
|}
 
|}
  
=== Week 4 - The 8-Bit Register Modules ===
+
=== Week 04 - Designing an ALU ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 171: Line 457:
 
|}
 
|}
  
=== Week 5 - Designing an ALU ===
+
=== Week 05 - The ALU Module ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 179: Line 465:
 
|}
 
|}
  
=== Week 6 - The ALU Module ===
+
=== Week 06 - The RAM Module ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 187: Line 473:
 
|}
 
|}
  
=== Week 7 - The RAM Module ===
+
=== Week 07 - Building a Binary Counter ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 195: Line 481:
 
|}
 
|}
  
=== Week 8 - Building a Binary Counter ===
+
=== Week 08 - The Program Counter Module ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 203: Line 489:
 
|}
 
|}
  
=== Week 9 - The Program Counter Module ===
+
=== Week 09 - Designing for 7-Segment Displays ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 211: Line 497:
 
|}
 
|}
  
=== Week 10 - Designing for 7-Segment Displays ===
+
=== Week 10 - Introduction to EEPROM ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 219: Line 505:
 
|}
 
|}
  
=== Week 11 - Introduction to EEPROM ===
+
 
 +
=== Week 11 - The Display Module ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 227: Line 514:
 
|}
 
|}
  
 
+
=== Week 12 - Connecting the Modules with a Bus ===
=== Week 12 - The Display Module ===
 
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 236: Line 522:
 
|}
 
|}
  
=== Week 13 - Connecting the Modules with a Bus ===
+
=== Week 13 - Designing Control Signals ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 244: Line 530:
 
|}
 
|}
  
=== Week 14 - Designing Control Signals ===
+
=== Week 14 - Control Logic Module ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 252: Line 538:
 
|}
 
|}
  
=== Week 15 - Control Logic Module ===
+
=== Week 15 - Programming and Deployment ===
  
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
 
{| style="width: 350px; margin: 25px auto; padding: 15px; border: 2px solid #cc0; border-radius: 20px; background: #ffc;"
Line 269: Line 555:
 
* Extend the processing capability to 16- or even 32-bit processing
 
* Extend the processing capability to 16- or even 32-bit processing
 
* Add additional input and output capabilities to the system (e.g., serial controllers, USB, disks, multi-line LCDs, etc...)
 
* Add additional input and output capabilities to the system (e.g., serial controllers, USB, disks, multi-line LCDs, etc...)
 +
* Building the modules in an FPGA
  
 
[[Category:Classes]]
 
[[Category:Classes]]

Latest revision as of 17:29, 19 June 2017


8-Bit CPU Using Logic Gates
Creator Andrew Vaughan
Date May 27, 2017
Estimated Time 16 Weeks
Estimated Cost $75



In this class, taught by Andrew Vaughan, you will learn how to build a functional (albeit, simple) 8-Bit CPU from scratch using breadboards and TTL Integrated Circuits. No prior electronics experience is required in the class, as the basics are covered in the first lesson. At the end of the course, you will have built a fully-functional, modular CPU, as well as your own personalized Assembly language, that you can extend indefinitely to create more extensive functionality.

Office hours are held before and after each class. The office hours prior to the class (timing of which will be announced with each class) are intended for members who have missed classes and need to catch up on modules for the upcoming lesson. Office hours after each class will provide a list of advanced topics from the lesson plan, which will only be covered if interest is shown. This time is also available to assist with debugging problems in circuits.

Time and Location

Instructor: Andrew Vaughan (Contact information available on user page)
Where: Pumping Station: One Electronics Lab (2nd Floor)
When: TBD
Office Hours: TBD
Minimum Class Size: 2
Maximum Class Size: 8

Prerequisites

There are minimal prerequisites to attend this class. No prior experience in electronics is needed, nor any experience with soldering or computers. It is important that novices attend the first classes, and make use of office hours, to ask questions before continuing on to more advanced topics.

Materials

Components will be group-purchased before each class to ensure proper components are bought, and to keep prices down. As such, the cost of materials can vary, depending on how many people are in class. While some materials are available in the electronics space, such assumptions should be taken with caution. You don't want to miss a class because the component you need isn't available!

Notice
This section is still under development. Please check back later for more information.

Components

The following components are required to build the CPU project. No components are "consumed" by this project, as long as it is built on a breadboard; so, if you so choose, you may reuse these components in future projects. A bulk-purchase option is given to students at the beginning of each class, which serves to reduce costs. The average cost, per-student, when bulk-purchasing all-new components is generally about $TBD. Prices last updated May 31, 2017.

Category Cost
(Individual)
Cost
(Class Rate)
Quantity Component Type Modules Used
Base -- -- 1 22AWG Solid Wire Kit, Various Colors (see below) All
$38.76 $38.76 14 Full-Sized (830-Point) Breadboards All
Resistors $0.80 $0.18 8 470Ω Resistor ¼W, ±5% Tolerance Clock, RAM, Display
$0.90 $0.20 9 1kΩ Resistor ¼W, ±5% Tolerance Bus
$0.80 $0.18 8 10kΩ Resistor ¼W, ±5% Tolerance Clock, Display
$0.20 $0.08 2 100kΩ Resistor ¼W, ±5% Tolerance Bus
$0.10 $0.04 1 1MΩ Resistor ¼W, ±5% Tolerance Clock
$2.48 $2.18 1 1MΩ Potentiometer ½W Clock
Capacitors $0.90 $0.65 6 0.01µF Capacitor Ceramic, ±10% 50V Clock, RAM, Display
$0.36 $0.27 2 0.1µF Capacitor Ceramic, ±10% 50V Clock
$0.75 $0.55 1 1µF Capacitor Conformal Coated, ±10% 35V Clock
Integrated Circuits $1.64 $1.33 4 LM555CN Timer Clock, Display
$1.14 $1.02 1 74LS00 Quad NAND Gate RAM
$3.45 $3.06 5 74LS04 Hex Inverter Clock, RAM, Controller
$1.26 $1.11 2 74LS08 Quad AND Gate Clock, Display
$0.59 $0.59 1 74LS32 Quad OR Gate Clock
$ $ 1 74LS76 Dual JK Flip-Flop Display
$ $ 1 74LS86 Quad XOR Gate ALU
$ $ 1 74LS138 3-to-8 Line Decoder Controller
$ $ 1 74LS139 Dual 2-Line to 4-Line Decoder Display
$ $ 4 74LS157 Quad 2-to-1 Line Data Selector RAM
$ $ 4 74LS161 4-bit Synchronous Binary Counter Program Counter, Controller
$ $ 7 74LS173 4-bit D-Type Register Register, RAM
$ $ 2 74LS189 64-bit Random Access Memory RAM
$ $ 6 74LS245 Octal Bus Transceiver Register, ALU, Ram, Program Counter
$ $ 1 74LS273 Octal D Flip-Flop Display
$ $ 2 74LS283 4-bit Binary Full Adder ALU
$ $ 4 28C16 EEPROM Display, Controller
Switches $ $ 2 Double-Throw Toggle Switch 8mm, DPDT, Latching Clock, RAM
$ $ 2 Momentary Tactile Switch 6mm, Normally-Open Clock, RAM
$ $ 1 8-Position DIP Switch RAM
$ $ 1 4-Position DIP Switch RAM
LEDs $ $ 41 Red LED 3mm, 1.8-2.3V, 20mA Bus, Register, ALU, RAM
$ $ 20 Yellow LED 3mm, 1.8-2.3V, 20mA Register, RAM, Controller
$ $ 11 Green LED 3mm, 2.8-3.6v, 20mA Ram, Program Counter, Controller
$ $ 22 Blue LED 3mm, 2.8-3.6v, 20mA Clock, Register, Controller
$ $ 4 7-Segment Display Common-Cathode, 10-Pin, 2mm Pin Pitch Display

For advanced participants familiar with soldering, StripBoard can be used instead to save space and money (about $30 in savings). Do note, however, that soldering and organization of these boards will not be covered in the class, and if chosen by the student, will need to be managed themselves. Using such boards can also make debugging and modification significantly more time-consuming and difficult. If using StripBoard, ensure that the board's pin pitch is the standard breadboard size of 0.1" (2.54mm).

Wire Color Guide

Wire colors are used for the following, so please ensure any kit you buy contains enough of each. Wire may be available in the Electronics Lab, but gauge and color cannot be guaranteed:

Red Power, Positive
Black Power, Ground
White Signal, Clock
Yellow Signal, Control Logic
Blue Signal, Module-to-Bus
Green Signal, Other (IC-to-IC, Module-to-Module, etc)

Recommended Tools

Most of these tools are available in the space. However, we will need to share them within the group, as well as with others who may be working in the space at the time. Especially in the case of hand tools and multimeters, you may wish to provide your own. Given the simplicity of this project, neither high-end nor high-precision tools are required for this project.

Unless specifically marked, it is recommend that you get your own tools for this project to keep pace with the rest of the class:

Tool Details
Flush Diagonal Cutters Used to cut wire and trim pins flush to a surface. Very useful for any electronics project.
Self-Adjusting Wire Strippers Used to trim the ends of wire sheathing (which we do a lot). Simpler strippers exist, if you wish to save money.
Multimeter
with Standard and Alligator-Clip Probes
Used to measure voltages, amperage, continuity, and generally debug problem circuits. Given the basic nature of this project, a high-precision multimeter is not necessary
Oscilloscope Used to debug and optimize circuits. We will use the Oscilloscopes in the Electronics Lab.

Authorizations

Please read the rules and responsibilities in the Electronics Area prior to attending. Along with these rules, the following authorizations must be completed to be eligible for this course:

Notice
This section is still under development. Please check back later for more information.

Syllabus

Classes are held weekly, and build on top of each other. It is important that all classes are attended, or completing the CPU will be very difficult. Office hours are made available prior to every class to allow persons who miss classes to catch up prior to starting a new lesson.

Prep Session: Electronics Fundamentals

Prior to getting into the course syllabus, an hour-long session will be hosted for anyone who is new to electronics. Nothing needs to be purchased for this class, and there is no maximum for the number of people who may attend. It is not required for someone interested in this prep class to be registered for the following 8-Bit CPU course - it is open to all members every time it is offered.

This course is not required for members already experienced with electronics in order to be successful with the remaining courses in the class.

Topics

By way of introduction into digital electronics, the prep class will dive into certain fundamental knowledge that is necessary for work on any circuit. The following topics will be covered:

  • Basic overview of common components and parts, where they are used, and how they work
  • Basic overview of how circuits work (the Hydraulic Analogy)
  • Alternating-Current (AC) vs. Direct-Current (DC)
  • Different methods of powering circuits on a breadboard
  • Building our first circuit - let there be light!
  • Kerckhoffs's Principle - AKA, how not to light your breadboard on fire
  • Introduction to resistors
  • Introduction to switches
  • The multimeter, measurement, and calculations
    • [P] Power; Watt (KW, W, mW)
    • [I] Amperage; Ampere or Amp (KA, A, mA, μA))
    • [V] Voltage; Volt (KV, V, mV, μV)
    • [R] Resistance; Ohm (MΩ, KΩ, Ω)
  • The Mystery Signal™ - learning how to debug a circuit
  • Introduction to diodes and transistors
  • Introduction to integrated circuits

After the lesson, students will receive an Electronics Cheat Sheet for their reference throughout the rest of the course.

After the Class

Office hours are held for up to an hour after the class concludes. This is an open-forum time period in which questions can be asked and answered. Optionally, students can also choose between these more-advanced topics, if they wish to learn more about the topics from the class' discussion:

  • Ideal components vs. reality
  • The physics behind how Diodes and Transistors work
  • The wide, wide world of components, and choosing the right one for your circuit
  • Different types of switches
  • Different types of resistors

Week 01 - Implementing Logic with Transistors

Notice
This section is still under development. Please check back later for more information.

Week 02 - The CPU Clock Module

Notice
This section is still under development. Please check back later for more information.

Week 03 - The 8-Bit Register Modules

Notice
This section is still under development. Please check back later for more information.

Week 04 - Designing an ALU

Notice
This section is still under development. Please check back later for more information.

Week 05 - The ALU Module

Notice
This section is still under development. Please check back later for more information.

Week 06 - The RAM Module

Notice
This section is still under development. Please check back later for more information.

Week 07 - Building a Binary Counter

Notice
This section is still under development. Please check back later for more information.

Week 08 - The Program Counter Module

Notice
This section is still under development. Please check back later for more information.

Week 09 - Designing for 7-Segment Displays

Notice
This section is still under development. Please check back later for more information.

Week 10 - Introduction to EEPROM

Notice
This section is still under development. Please check back later for more information.


Week 11 - The Display Module

Notice
This section is still under development. Please check back later for more information.

Week 12 - Connecting the Modules with a Bus

Notice
This section is still under development. Please check back later for more information.

Week 13 - Designing Control Signals

Notice
This section is still under development. Please check back later for more information.

Week 14 - Control Logic Module

Notice
This section is still under development. Please check back later for more information.

Week 15 - Programming and Deployment

Notice
This section is still under development. Please check back later for more information.

Completion

Upon completion, each member of the class will have a modularized, extendable CPU. The CPU can be programmed using an Arduino Programmer, which can be borrowed during the class, or built in one of the after-hours office-hours. Here are some examples what can be done to extend and modify the basic circuitry:

  • Create additional circuitry to support more-advanced instructions
  • Add more capabilities to the ALU to enable more-powerful processing
  • Transition 7400-series integrated circuits to more-advanced functionality to reduce circuit complexity
  • Extend the processing capability to 16- or even 32-bit processing
  • Add additional input and output capabilities to the system (e.g., serial controllers, USB, disks, multi-line LCDs, etc...)
  • Building the modules in an FPGA