Build a home computer lesson plan
From a CPU of NAND gates to a machine with a keyboard, a screen, a hex monitor and a BASIC that saves your programs.
Objectives and materials
By the end, students can
- A CPU, a keyboard decoded by hand, and a screen driven a byte at a time.
- A machine code monitor, then a BASIC with an interpreter you can read.
- Type in a program, play it, change it and save it.
Materials for the whole unit
- Arduino Uno R3
- Bit switch
- chip:c26
- Program ROM
- PS/2 keyboard
- Step clock
- Terminal
Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.
The hardware
A CPU, a keyboard decoded by hand, and a screen driven a byte at a time.
| Lesson | Time | What students do |
|---|---|---|
| The Kestrel CPURun a CPU of four thousand NAND gates, step it one instruction at a time, write it a loop in machine code, and find what it would need to be a home computer. | 65 min |
|
| A keyboardDecode a PS/2 keyboard by hand: an interrupt on the clock, eleven bits a frame, odd parity, and set 2 make and break codes turned into letters. | 65 min |
|
| A text terminalDrive a screen one byte at a time with eight data lines, a write enable and a clock, and make Enter, Backspace and Escape do what a terminal does. | 75 min |
|
Materials
- Arduino Uno R3
- Bit switch
- chip:c26
- Program ROM
- PS/2 keyboard
- Step clock
- Terminal
Check for understanding
Each student finishes "A text terminal" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A second keyboard".
The software
A machine code monitor, then a BASIC with an interpreter you can read.
| Lesson | Time | What students do |
|---|---|---|
| A monitor programLook at memory, change it a byte at a time, and run it: a 1976-style hex monitor that loads Kestrel machine code you assemble by hand. | 65 min |
|
| BASIC-liteProgram the machine in a small BASIC: a calculator at the prompt, variables, numbered lines, FOR loops, IF and GOTO, and the errors that tell you what went wrong. | 75 min |
|
Materials
- Arduino Uno R3
- PS/2 keyboard
- Terminal
Check for understanding
Each student finishes "BASIC-lite" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Decisions and jumps".
Your computer
Type in a program, play it, change it and save it.
| Lesson | Time | What students do |
|---|---|---|
| Project: type and run a programType in a game the way magazines printed them in 1980, play it, make it harder, save it to EEPROM and load it back after wiping the machine. | 75 min |
|
Materials
- Arduino Uno R3
- PS/2 keyboard
- Terminal
Check for understanding
Each student finishes "Project: type and run a program" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Share your program".
Teach this unit as a class
Start a class from this course and its 6 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.
The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.