aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 6799d8f3f16f12492e6e1a892f10f04be0c66e31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 8bit breadboard computer

This is a collection of little scripts to write the EEPROMs for a 8 bit 
breadboard computer (by Ben Eater).
The EEPROM is connected to the Raspberry Pi via the GPIO pins.

## 7 hex display
the computer has two 7 hex displays attach to it. With those display an 8bit 
number can be displayed in hex format. The dispaly are controlled by two 
EEPROMs. Setting the addresss lines to 0x1 on the EEPROM display a 1 on the 7 
hex display. Setting the address lines to 0x2 displays a 2, ...

## Control logic
The control logic of the 8bit computer is implemented as two EEPROMs, which 
computes a boolean function.
In the script inst.py are the definitions of the hard-wired connections of the 
EEPROM to the control signals. On top of that some micro instructions are 
constructed.
Furthermore the real instructions are implemented upon these micro instructions.

Currently implemented instructions are:

- LD{A,B}: Load the last four bits of the instruction into the A/B 
  register
- ADD/SUB_{A,B}: add/subtract the content of register B from the content of register A 
  and save the results in register A or B respectively.
- REG_{A,B}_OUT: display the conent of the register A/B on the 7 hex display
- PC_LOAD: load the last four bits of the instruction into the programm counter 
  register
- HLT: halt the computer

On the TODO list are conditional jump instructions and an instruction, so that 
the 8bit breadbord computer an write to the EEPORM itself, and using it e.g. as 
a stack.

## example programms
The following example programms are currently impletemened:

- test programm: load the value 0x1 into register A and 0x2 into register B, 
  adds the content and save it to register A.
- fibonacci: loads the start values 0x1 and 0x1 into the register A and B and 
  computes the fibonacci sequence.