Another microcontroller built in Logisim

A small 8 Bit microcontroller built with Logisim, needs 6 ticks per instruction

Similar projects worth following
This is a neat small microcontroller made some time ago with the simulation program Logisim. It's features are:
- any instruction takes 6 cycles
- provides all basic math and logik instructions
- skip instructions on zero or not zero
- use program counter for calculations (e.g. "substract reg_PC l5 reg_PC" jumps back 5 instructions)
- 8*8 inputs + 8*8 outputs
- 128 byte ram
- 256 byte rom
- 256 byte stack

You can find a download-link on the left. But remember that I did this without any tutorial and parts of it may be solved in an unusual way ;-)

PS: The reason why it says "another": I just discovered that martin2250 has done exactly the same

In one instruction the microcontroller can do quite a lot. The basic structure is:
operation value1/address1 value2/address2 destinationaddress
And if you pick a special address as your destination, you can do special things, e.g. skip the next instruction if your result is zero. All in 5 ticks!

And it comes with an assembler too. It's written in Python and makes programming very easy. This is a program to flash a led:

define ledport PORTB
label: main
copy l0 ledport
copy l1 ledport
setPC main

  • Update v6: Now has stack -> call and return

    schuhumi05/28/2014 at 19:17 0 comments

    Here's version 6! It offers:

     - 256 byte Stack

     - use "_call" and "_return" for super easy function handling

     - improved assembler which makes ramdom jumping in the program a pleasure. No matter where your "label:" and "setPC" (or "_call") in the code are - it will figure out the correct addresses

     - added I/O: tty-display and keyboard

    But with the update there comes one drawback: I had to increase the ticks per instruction to 6 since I got in trouble with race conditions leading to random results. But it is still quite good though if you think of what it can do in one instruction cycle..

    The download includes 7 example programs, which demonstrate the new capabilities too

View project log

Enjoy this project?



Ryan Gass wrote 05/28/2014 at 21:12 point
Awesome project! I am working on a very similar project. I'm writing a basic Z80 clone on an Arduino.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates