My blog has moved

My blog has moved to joescomputerblog.000webhostapp.com/blog.html.

Advertisements

Making a Mechanical Keyboard

I haven’t posted in a while because I have been so busy with little projects, anyway, this particular project has got me very exited – my mechanical keyboard.  This post will document my progress.

The parts I used to make the mechanical keyboard:

  1. This case in  black
  2. A GH60 for the PCB
  3. 61 Gateron browns
  4. This black key plate
  5. These key caps

Altogether this keyboard cost about £80 to build.

My first step, the easiest step, was to place all the switches into the key plate and this took me about 10 minutes.  Here is a picture of all the keys in the plate:

20180627_122133

Next was hardest part, placing the keys into the the PCB. This took a lot longer than I expected because it was difficult to line the keys up in a uniform way.  Here is a picture of the key switches in the PCB. The key caps are there for lining up purposes.

20180627_195125

Once I had placed the keys in the PCB I could start soldering. It took a lot less time than I thought it would (altogether it took about 30 minutes to finish soldering).   Then finally I screwed the keyboard into its case and tested it. It worked first try!

Here are some pictures showing the final result:

Thanks for reading!  Hopefully next time it will be another post about my 4-bit CPU!

Super Basic Logisim CPU Design

Hi, for the past couple of days I have been working on a design for an 8-bit CPU (LPU-1).  To design it I used Logisim, a great free logic simulation program.  I’m doing this as a stop gap whilst waiting for components to arrive from China for my 4-bit TTL CPU.

LPU-1 has 3 general purpose registers – A, B and an accumulator – which is a rather limited amount of registers by usual standards.  It also has a carry register, 2 64KB RAMs (one program memory and one data memory) and 11 instructions.  It doesn’t have a central bus but I probably should have put one in because it is more convenient.  On LPU-1 I/O is handled by the accumulator.

Here is a Picture of the Logisim design file that I created.  Download the open-source here:

LPU

The instruction set :

  1. ADD – Adds register A to register B and stores the result in the Accumulator
  2. SUB – Subtracts the contents of register B from register A and stores the result in the Accumulator
  3. PUT [REGISTER], X  – Puts the value X in [REGISTER]
  4. JMP X – Jumps to location X
  5. JEZ X – Jumps to location X if register A’s contents is equal to 0
  6. JNC X – Jumps to location X if the carry register is not 1
  7. MOV [REGISTER], [REGISTER2] – Puts the value held in [REGISTER2] into [REGISTER]
  8. LDA – Loads the value from an address held in register A into the Accumulator
  9. STA – Stores the value held ine the Accumulator into an address held in register A
  10. AA – Moves the value held in the Accumulator to register A
  11. HLT – Stops the clock

Here is a video showing LPU-1 running a Fibonacci sequence program:

I tried to write an assembler in Golang but it was poorly written and wasn’t working properly. I might attempt to do this again some time.

I plan to make a better version of LPU-1 soon (maybe even LPU-2!)  with many more registers, a central bus, 1 RAM instead of 2 and an updated instruction set.

Thanks for reading, please feel free to make any comments or constructive suggestions that will help me with my CPU progress!

 

BIG ACHIEVEMENT TODAY… I set fire to the ALU

Haven’t posted for a while, here is what has happened since the last post:

So, I decided that it would be best to make the ALU on a single PCB as it would take up less space. I set about ordering more PCB’s. This time I purchased them from a company in China called allpcb.com. They came within 3 days from the date of order and they only cost £13 for 5 (bargain!).

Here is a picture of them on arrival:

20180208_103334-1072642133.jpg

20180208_104117373226838.jpg

Next I soldered the components to the PCB. It took me two hours to solder the parts on but by the time I had finished my soldering speed and accuracy had vastly improved.

20180208_103945-1571238419.jpg

Having finished soldering the components to the board, I set it aside for a few weeks whilst I concentrated on my other projects (I am making some synthesizers :D).

Today I returned from a raspberry jam, newly inspired to continue with my CPU. It was late, I was rushing and a little over keen to get on with it…

… and this happened!

7fd56e2a-e442-4c33-b5ef-a31ef0826913438168894.png

Whoops… next time I must remember to remove the tinfoil when I apply 5 volts to my circuit (I really don’t like this smell and it is making me feel a little sad inside). Thankfully none of my chips were destroyed in the process but now I need to spend another few hours de-soldering and reassembling the components onto another PCB.

Today, I have learnt a lot!

PCB’s And RAM Problem Solved

backupPreview

So, a couple of days ago I set to work soldering together a 4-bit “AND” module thing for the ALU… it took me a very long time (I am terrible at soldering).

Here are some pictures documenting my (slow) progress:

 

Next I decided it would be better to order some PCB’s, so I booted up my computer and googled PCB design. After a brief search I came across a program called KiCad (link: http://kicad-pcb.org/) and I downloaded it. With the help of some YouTube tutorials I got to work learning how to use it and came up with my first schematic for a PCB (A bus control module):

Buffer Module

I then redesigned it as a PCB:

Buffer Module PCB

Here is a 3D view of the same PCB:

buffer module 3D

Lastly I designed one more PCB (The AND/OR/XOR Module). Here is my schematic designed using the opensource  program KiCad (link: http://kicad-pcb.org/).

AND OR XOR Schemeatic

AND OR XOR PCB

AND OR XOR

This is kind of embarrassing but I eventually figured out how to get more RAM for the CPU by making the program counter 8-bits and making the instruction register 12-bits so that there is room for addressing 8-bits of RAM.

Thanks for reading. Stay tuned for more updates!

🙂

A 4-Bit ALU

This is the part where I should probably introduce myself and tell you a little bit about what I am trying to achieve, so…

My name is Joe and I am a home educated twelve-year-old from the UK, I am currently working on a 4-bit CPU project.

Here is a picture of me:

Me

What I am trying to achieve

Being an inquisitive sort of guy, I was compelled to find out about the process of designing a CPU. What better way to do that than actually building one yourself! So after spending days researching on the internet and applying previous knowledge I gained from a computer architecture book, I set to work ordering my components (7400 series IC chip’s and a TON of wire).

The plan is to build a 4-bit CPU that will have a 16 bytes of ram, around 10 instructions and five registers (two general-purpose registers and one accumulator, a program counter and an instruction register).

What I have made so far

So, this is a picture of a bread board prototype for a 4-bit ALU. It has six commands OR, AND, XOR, NOT, ADD and SUBTRACT.

1514375440139997091025

The components used to build the ALU:

  • 74LS04
  • 74LS08
  • 74HC125
  • 74LS32
  • 74LS245
  • 74LS283
  • 74LS86
  • DIP switch
  • Coloured LEDs
  • Lots of wire

What’s next?

Next I need to transfer my breadboard prototype for an ALU onto some stripboard and then I can move on to building the RAM and the registers and finally build a control unit.

Thanks for reading I’d really like to hear any comments, questions or suggestions you may have.

🙂