DofE – Summary
In total this project has taken me about 26 hours, which works out to roughly an hour a week for 6 months.
The Clock
The clock module is the topmost module in the image below. It has two modes, an automatic mode and a manual mode.
In manual mode, the clock only ticks when a pushbutton is pressed. This push is debounced and regulated as to not send any unusual clock pulses that might cause other parts of the computer to break.
In automatic mode, the clock automatically ticks at regular intervals. The speed of this can be adjusted using the potentiometer (blue thing on the top left).
Registers
The registers are the 2nd and 4th modules (from top to bottom) in the picture. They are used for storing data. They have two modes, input and output.
The output mode constantly outputs the data stored in the register to the bus. (For now it is represented by the yellow LEDS on the left) This value can then be read by the other registers or other parts of the computer later on.
The input mode reads the data currently in the bus and stores it in the register on the next clock pulse. This data is then stored until power is lost, it is reset or the value is changed. This data can then be used in the ALU or put back onto the bus later on.
Both registers also have the ability to reset the data inside them.
ALU (Arithmetic Logic Unit)
The ALU is the 3rd module down and it’s job is to do basic arithmetic math. It can add and subtract numbers from the registers.
Image
Video
This video demonstrates the clock’s functionality, and the ALU adding together two numbers from the registers.
RAM
RAM stands for Random Access Memory and is the short term place of storage for currently running programs and data on the computer. My RAM modules stores 16 bytes of data. It is essentially 128 registers all in one module.
MAR
MAR stands for memory address register. It controls the address that the RAM reads from. In this case it also controls whether we are in manual (programming) mode or in automatic (running) mode, which can be done by using the push switch on the left. In programming mode, there is a dip switch to change between different memory locations. In automatic mode, it works similar to one of the registers from last week, where it takes an input from the bus on which address to load, stores that address (unless changed) and then sends that address signal to the RAM module.
MDR
MDR stands for memory data register. It controls the data which gets read from and put into the RAM. It uses the same manual and auto from the MAR in order to change modes. In automatic mode, there is again a DIP switch to set values to be put into ram and then push button to confirm and enter these values. In manual mode, it reads in data from the bus when given the signal to and then puts this data into the RAM. In both modes, it outputs the data to the bus when told to.
Instruction Register
This functions exactly the same as the other two registers, just inverted on the breadboard. It also has some different coloured LEDs representing a RAM location and an instruction number.
Video
Here’s a video showcasing how the different functionalities work at this stage.
Program Counter
The program counter does what it says, it counts, from zero . Specifically, the one I have built is a 4-bit binary counter. 4-bits for the 4-bits of memory locations we have in RAM.
This section had a quite a bit of theory, learning about master slave JK flip flops and how they work. They are chained together to form the counter we have built above. However, for simplicity’s sake, we just use a binary counter chip which does this for us.
Output Register
The output register uses an EEPROM (Electronically Erasable Programmable Read Only Memory) to convert binary inputs into the correct output for the 7 segment displays. In order to program this, I built a EEPROM programmer using an Arduino.
Then the programmed chip is wired up to some 7 segment displays to form the output register, turning binary numbers into a 4 digit output.
Unfortunately at this stage, the 6 months was up and I haven’t had much time since to be able to bring everything together.