MikroLeo, A 4-Bit Retro Learning Platform

MikroLeo is a discrete TTL logic-based microcomputer intended for educational purposes created by [Edson Junior Acordi], an Electronics Professor at the Brazilian Federal Institute of Paraná, Brazil. The 4-bit CPU has a Harvard RISC architecture built entirely from 74HCT series logic mounted on a two-sided PCB using only through-hole parts. With 2K words of instruction RAM and 2K words of addressable RAM, the CPU has a similar resource level to comparable machines of old, giving students a feel for how to work within tight constraints.

Simulation of the circuit is possible with digital, with the dedicated PCB designed with KiCAD, so there should be enough there to get cracking with it. Four 4-bit IO ports make interfacing easy, with dedicated INput and OUTput instructions for the purpose. An assembler, compiler, and emulator are all being worked on (as far as we can tell) so keep an eye out for that, if this project is of interest to you.

We like computers a bit around these parts, the “hackier” and weirder the better. Even just in the 4-bit retro space, we’ve seen so many, from those built around ancient ALU chips to those built from discrete transistors and diodes, but you don’t need to go down that road, an emulation platform can scratch that retro itch, without the same level of pain.

22 thoughts on “MikroLeo, A 4-Bit Retro Learning Platform

      1. For anyone who has actually build a discrete CPU the answer would be obvious.
        General knowledge of the inner workings of a CPU, even if you can see its registers and step debug it, is not the same. Even a digital simulation will fall short.

        1. I actually thing that modifying simple VHDL cpu is more interesting for most people…
          I definitely did that during my engineering training, improving some opp codes to be single clock or adding new opp code is a great way to understand how it work and why it’s done like that…

      1. Hi Cad the Mad, how are you?
        Sorry for that, but I have created only a 4-bit microcomputer.
        Who knows, maybe someday, I’ll create all of this you said and much more. See you there!

        1. Hey, don’t mind me I was being sarcastic. I love your project and appreciate your work.
          Keep it up, and don’t let these curmudgeons get you down. Most of them are decades out of touch.

          1. Hi Cad the Mad, thanks for your response and support!
            There are still many things to do. For now, I’m finishing a Python program to “compile” .asm source files. I’m also working on an emulator in c++.
            There is also the documentation part that I need to prepare carefully so that people can easily understand how to create a program, compile it, send it to MikroLeo, run the program and follow the execution of each instruction. Not to mention hardware-specific documentation, functionality, how an instruction is executed, how machine code is encoded, data flow, manual programming with physical switches etc.
            Furthermore, I need to write simple programs with a nice documentation, for example, on how to implement subroutine, how to use a text LCD based on HD44780 controller etc.
            But I’ll try to keep everything up to date!

  1. Why are there no LEDs? If you have an educational discrete CPU and you can not see the internal states, that’s quite useless.

    I have the “8bit Computer MK1” sitting on my desk. I think that is a better example.

  2. Burkhard Kainka did a very nice 4 Bit Project:
    TPS – a very minimal 4 Bit emulation
    and to cotrol/program it just uses 3 push buttons.
    Yes it works – I do have a few versions, and you can see some videos
    I started a facebook page
    https://www.facebook.com/groups/269499491046124
    There are quite a few implementations now, an Emulator
    and Willie did an online version of this – no hardware required.
    And to generate a few real Outputs, you can use
    a couple of LDRs on your monitor to control real LEDs via a CD4011 – see the video

    I like the project presented here – but who can replicate it?
    There seem to be hardly any LEDs – so you cannot see what is happening.
    But we all have our preferences …

    1. Hi juergenUK, how are you?
      I’m preparing a detailed bill of materials.
      To replicate it, just buy all the components, and send the Gerber files to produce the PCB in some company.
      Of course, some practice with handling a soldering iron and basic knowledge of electronics, components, etc. are also desired.
      I’m working on the project documentation, and I want to write a detailed assembly manual that will help anyone who wants to build it.

      1. I am soldering now for about 50 years at least – so no issue.
        But I have to limit the number of spare time projects I do.
        So I try to to limit it to projects not too complex. Just for fun.

  3. Thanks guys, for all the comments. I respect and admire all of you who are here!

    Indeed, the 8-bit Computer MK1 has a very cool and beautiful design. It’s a fantastic project! However, it uses ICs with PLCC sockets and has microcode, which is beyond the scope of MikroLeo. One of the goals of MikroLeo is to use only through holes for easy assembly. Furthermore, with MikroLeo, it is not necessary to write an EEPROM, for easy configuration.

    The use of chips such as the ATMega, FPGA, microcontroller or microprocessor is also not one of the objectives of the project, as it was designed to use only simple ICs. If you use these chips, the individual study of the essential elements of computers (arithmetic and logic unit, memory, addressing, generation of control signals, program counter, registers, etc.) must be abstracted.

    LEDs and 7-segment displays can be easily connected to MikroLeo. All control signals, registers, data buses and the program counter are available through the pin header connectors. If everything were put on the PCB, it would greatly increase the size.

  4. Somewhere I Have my old homework from a Computer Engineering degree. 4 bits, one 74HC184, static ram, One week Lab project, and I don’t remember much else. I think the week
    before we had to build the equivalent of the ‘184. I remember playing games to get ‘free’ operations from a simple adder. These things haunt my dreams.

Leave a Reply to edsjacCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.