Skip to content

Work Log

Adam Antoshin edited this page Jul 5, 2020 · 23 revisions

Work Log

This page will serve as detailed documentation for progress made to the circuit itself, in addition to any changes made to non-software aspects of the project. For software progress, see commits, pulls etc.

20/06/19 - 01/01/20

Inspired by Ben Eater's videos, I decided to build a similar computer for my final ECE high-school project. I knew this project would take a very long time, so I started working on it the summer before school year.

I watched Eater's videos and decided on a few changes I'd make to the computer (I can't just copy his work for my own project, right?):

  • Use the MCM6810P 128-byte RAM chip instead of the 74189 64-bit chip

  • Since the project guidelines demand that I use some sort of a ready microprocessor, the computer will be interfaced with an Arduino using a physical driver circuit (still not sure that's the right term) consisting of various MUXs and gates.

    • The basic feature will be giving an 8-bit input to the input register and reading the output of the computer

    • Other features I might include if I have time are:

      • Automatic programming to RAM
      • Assembler
      • Reading programs from SD card

The specs of the final project will be (as of 02/01/20):

  • Adjustable clock frequency of about 1 Hz to 1.35 kHz with a manual pulse (monostable) mode

  • 8-bit processing, memory and output

  • 128 byte RAM

  • 8-bit word input

  • Quad 7-seg display for output

  • I/O interface with Arduino

  • 15 instructions (including NOP), option for 113 more (128 possible instructuions). Example: LDA 15 (load value in address 15 to register A).

I then began building the circuit on breadboards. After building a few parts of the computer and going on a short haitus, I realized I made a grave mistake while building my circuit without drawing schematics first. I've then drawn my schematics and made sure to draw one before building each part.

After a bare-bones version of the computer was built, testing began (don't worry, I tested each part individually). It could run basic programs successfuly, but the main problem was that sometimes the counter in the control unit would skip a beat, throwing the program execution off-course. My main theory was that the clock signals weren't clean enough, but I couldn't test that since I didn't have an oscilloscope at the time.

Around that time, the teachers told me I had to build the project on either a wire-wrap board or a PCB. Perhaps it was for the better, since breadboard connections aren't exactly reliable. Since I don't know how to work on PCBs, I decided to start building my computer on several wire-wrap boards.

A more detailed work log in Hebrew can be found here.

02/01/20 (10:00)

I've decided that in addition to the work log I wrote on Google Docs in Hebrew until now (and which was required by the project guidelines), I'll create a public GitHub repository where I'll document my progress in English (starting now at least). This is my first serious repository so it's going to take a while until I learn the ropes.

I uploaded all the schematics, programs and other files regarding the project and will upload images of the circuits in the future.

My progress until now:

  • Schematics for the entire project

  • Arduino programs for EEPROM programming and interfacing with the computer

  • A complete breadboard circuit (minus the Arduino driver)

  • One wire-wrap board consisting of these modules:

    • Clock
    • Memory Address Register (MAR)
    • RAM
    • Instruction Register (IR)
    • Input register
    • Board port (with connections to Arduino drivers for the input)
  • Second wire-wrap board with Program Counter (PC). Will consist of:

    • Registers A and B
    • ALU
    • Flags register
    • Output
  • Plans for 2 more boards for the Control Unit and Arduino Driver

02/01/20 (17:00)

I have soldered all the necessary IC sockets and components for the A register and the flags register (only the register itself). In addition, I made all the necessary connections with wire-wrap. I've yet to test the circuit.

06/01/20 (10:00)

I have uploaded images of my boards to the documentation folder and will continute to update them every time I make significant changes/progress. I've also updated the work log with my progress on 02/01 since I forgot to do so.

I also began working on the wiki, starting by moving the work log file here, after reading about how the wiki's purpose is documentation, thus rendering the file unnecessary (in its previous location).

06/01/20 (15:00)

  • Tested A register successfully
  • Soldered components for ALU (without 2's complement logic) and flags register (logic gates).
  • Hooked up power, ground and bypass capacitors for said parts.
  • Updated images

08/01/20

  • Wired ALU (minus the 2's complement logic) and flags register logic
  • Soldered part of the components for the B register. I determined the tri-state buffer is not necessary as the register doesn't output to the bus, so the socket was not soldered. Changes will be reflected in the schematic.
  • Checked for shorts

13/01/20

  • Soldered LEDs for B register and wired bypass caps, power, and part of the 2's complement logic

14/01/20

  • Updated B register and overview schematics

15/01/20

  • Wired B register and 2's complement logic
  • Checked for shorts
  • Soldered components for display module and output register
  • Updated board images
  • Programmed a string to int lookup table in C. If I'll write an assembler for the computer, this model will serve as a key part in the code.

16/01/20

  • Wired display module and output register
  • Checked for shorts
  • Updated board images

20/01/20

  • Programmed display EEPROM using my breadboard Arduino programmer.
  • Soldered and wired bus LEDs and resistors
  • Wired part of the second board's external port
  • Ran tests for the whole board. Display fluctuated between the right value and all segments on. I wasn't using all of the address pins, so this made me realize I didn't connect the remaining ones to ground, causing the glitch. Display fixed successfully.
  • Updated board images

21/01/20

  • Finished board 2 external port wiring
  • Updated board images
  • Updated README to include references, block diagrams and more precise description

22/01/20

  • Planned board 3 layout (Control Unit)
  • Soldered components
  • Uploaded board images

29/01/2020

  • Updated Arduino EEPROM programs to be more clear and readable

30/01/20

  • Wired part of the control unit
  • Updated board images

05/02/20

  • Finished wiring control unit
  • Set up the whole system to debug (w/o the arduino)

Program counter seems to behave erratically. A few hours of debugging provided little help with solving the issue, but I did come to the conclusion I should make a few changes regardless of the problem at hand:

  • Add electrolytic capacitors accross the power supply
  • Solder pull-up resistors for unused TTL inputs
  • Solder pull-down resistors for inverter outputs at the control unit (output is switching between ~3V and 5V without resistors)
  • Solder thick wires for the supply voltage on each board to improve power districution
  • Disconnect control unit board and walk through programs manually to narrow down the source of the problem.
  • Solder current-limiting resistors to LEDs.

06/02/20

  • Soldered and wired EEPROM programmer board
  • Incorporated SPI to EEPROM programmer Arduino programs and updated pins

07/02/20

  • Testing on an individual 74LS245 buffer chip shows adding a single 220 ohm resistor in series to the 8 LEDs at the output dramatically reduces the current (from ~320mA to ~60mA), raises the output voltage (from ~2V to ~3.6V) and keeps the brightness tolerable.
  • This week I'll be making the changes I listed on my entry two days ago and solder current limiting resistors like I connected them today (one resistor per LED group).
  • Later I'll update all the schematics to add bypass capacitors, current limiting resistors and minor fixes.

13/02/20

  • Soldered current limiting resistors to LEDs
  • Soldered pull-up resistors to unused TTL inputs
  • Soldered pull-down resistors to CU inverter outputs
  • Added 220uF electrolytic capacitors accross PSU

22/02/20

  • Temporarily solved erratic program counter behaviour by shorting HLT line to ground. Apparently, it's common for EEPROM outputs to fluctuate whenever the address changes.
  • Temporarily solved random A register clearing by adding 100 ohm pull-down resistors to CLR pins.
  • Found out flags register isn't working
  • Made computer run a simple program: add 1 to a number and display it. Program runs in an infinite loop.

28/02/20

  • Temporarily solved the HLT fluctiation problem with an LP pass. Now the HALT instruction works in low clock frequencies. Will permanently solve the problem with a register to make a clock-latching HLT line.
  • Found the source to the flags register problem to be a loose jumper wire. Register working properly now.
  • Made the computer run a fibonacci sequence program that halts when output overflows.

13/02/20

  • Soldered pulldown resistors on register A
  • Successfully tested HLT latch solution with an 8-bit register chip
  • Started planning "wire box" to which the boards will connect with flat wires

16/03/20

  • Major schematic revision

17/03/20

  • Added output interrupt to Arduino driver (schematic)
  • Created board ports schematic

Aftermath

Due to the limitation imposed by the COVID-19 pandemic, I was unable to complete the entire project. I was, however, able to build the entire circuit of the CPU itself (without the Arduino driver). I've also completed the project booklet, which I was able to turn in without an actual working product. Overall, regardless of the fact I was unable to complete the circuit, I think the project was a success.

To prevent this repo from turning useless, I'll work on updating the wiki to help other pursue similar projects. The wiki will be a short and simple translation of my booklet (which I might also upload).

If I decide to work on this project further, I'll make sure to update the repo accordingly.