aboutsummaryrefslogtreecommitdiff

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.