GithubHelp home page GithubHelp logo

slu4coder / minimal-uart-cpu-system Goto Github PK

View Code? Open in Web Editor NEW
148.0 14.0 26.0 33.85 MB

Legacy: TTL-only CPU featuring UART I/O, an expansion port, 512KB SSD at up to 10MHz clock speed

Python 12.30% Assembly 83.09% C++ 4.62%

minimal-uart-cpu-system's Introduction

Legacy: Minimal UART CPU System

See https://github.com/slu4coder/Minimal-64x4-Home-Computer for the most recent version.

Quick note: This is a free and non-commercial project. I am in no way associated with any activies selling this as a product. Any such activity represents a license violation. Individual licenses apply for hardware and software parts. Please refer to appropriate documentations for detailed licensing information.

Minimal CPU 2.0 'Ultra' is now running at 10MHz(!) and may well be the fastest 8-bit general purpose 74HC logic breadboard computer to this date:

Ultra

Latest PCB version 1.5:

test

● Build your own 'Minimal CPU System' on breadboards: https://www.youtube.com/watch?v=Gz1VVOsNn_8

● Python-like high-level programming language MIN released: https://www.youtube.com/watch?v=H342TwW4R7k

● 'Minimal VGA Extension Card' released! https://github.com/slu4coder/DIY-VideoRAM/tree/main/KiCAD

● 'Minimal CPU System' Emulator released! See user manual chapter 'Minimal Emulator' for details.

● Native assembler and text editor released!

● User Manual and Reference: https://docs.google.com/document/d/1c2ZHtLd1BBAwcBAjBZZJmCA3AXpbpv80dlAtsMYpuF4/edit?usp=sharing

● Revision 1.5 is out now featuring 512KB FLASH SSD, 3.6864MHz clock speed and an expansion port! https://www.youtube.com/watch?v=osVi06VKvA0

● Minimal Python Assembler released: https://www.youtube.com/watch?v=rdKX9hzA2lU

● The Minimal CPU System now has a dedicated hardware serial 'Minimal Terminal': https://github.com/slu4coder/Minimal-Terminal but can also be operated via a USB-to-serial breakout board and a terminal emulation (e. g. Tera Term) of cause.

I've built my own Computer from scratch - using nothing but TTL chips, because, well, why not? I wanted a CPU that is easy to understand, fun to build and powerful enough to allow for programming educational stuff and little games on it. Ah, and by the way - it should be as simple as possible - sort of the "Simplest Usable Personal Computer". This repo provides you with everything you need to follow my one-and-a-half-year journey down this rabbit hole. Besides running some video game classics, this little DIY CPU is capable of parsing arbitrary mathmatical expressions and performing floating point calculations in single (32-bit) precision. And it comes with an SSD file system, too, since it uses it's own FLASH IC as permanent SSD storage. Over the last year I have written an entire native toolchain: a text editor, an assembler and the Python-like high-level programming language MIN.

WHAT YOU GET:

● Block diagram of the CPU and overview it's instruction set

● KiCAD project files with detailed schematics and PCB layout

● Gerber files ready to be submitted at any PCB manufacturer of your choice

● Bill of material

● Images in .bin format of both the ROM and the CPU's control microcode

● Source code of the minimal operating system MinOS and several demos and games

● Cross-assembler 'asm.exe' running on Windows (or Python) to comfortably write, assemble and upload your own software

TECHNICAL SPECIFICATION:

● Processing power (1.0Mips @8.3MHz) comparable to 2.3 x Commodore 64 or Apple II

● Clear(est?) and simple(st? – you judge!) design for fun and education

● 8-bit data bus, 16-bit address bus, Von-Neumann architecture

● 64 instructions (conditional branching, subroutines, stack and word ops)

● 32KB RAM / 512KB FLASH ROM (OS, memory monitor, disassembler, tools)

● SSD file system (commands LOAD, SAVE, DIR, DELETE, FORMAT as you'd expect)

● UART interface (up to 500kbps) for terminal display, keyboard input and file I/O

● Expansion port (I/O card and VGA card available, build your own!)

● 24 (16) control signals, 2 registers A and B, ALU (arithmetic and logic unit) = simple adder, 3 flags (negative, carry and zero)

● Built from 74HCxx TTL logic on 120mm x 190mm PCB or 8 breadboards

I hope you find this information useful, educational or otherwise interesting. I'd love to hear about your build, so meet me on YouTube.

https://www.youtube.com/channel/UCXYQcMpUBT3aaQKfmAVJNow

Have fun! slu4

minimal-uart-cpu-system's People

Contributors

slu4coder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minimal-uart-cpu-system's Issues

Why not use some on-board signal for flow control of the UART port?

Since this machine is of no UART interrupt or timer-based polling mechanism for RX, the programme should take full responsibility to read out the received byte before the next one coming in. This may constrain the programme staying within a polling loop for not missing any bytes. I think a hardware flow control signal like RTS/CTS may help avoid data loss while maintaining code flexibility (the PC terminal side is with much larger TX buffer than only one byte RX buffer on this board).

I guess 2 signals within the UART receiver block can server as the RTS: the output Q of the SR latch (marked with blue frame) or the DATA_READY (DR, marked with orange frame) signal. The former one turns High after the first falling edge of RX input while the latter one turns High after the entire byte being received. And they both will not turn Low unless the received byte is read out, which makes them suitable to act as the RTS flow control signal.
rxReceiver

I will link these wires to the CTS pin of the serial adapter and check whether this would work (as soon as I receive the chips and PCB and build up this machine). Post this issue here for discussion first.

ACB does add and load

Hi. I have ordered a "Bravo" kit and have been getting my head around the various opcodes.

It seems to me that ACB behaves differently to ADB SBB and SCB. The subtractions have specific microcode to preserve the original A in the B registers. ADB loads the added value into B and never changes A.

ACB0 (and ACB1) do the following as can be seen in the Microcode which ends up AO|RI e.g. it's copying the result from A.

I have tried it experimentally in the emulator which I presume is microcode driven (I have my own non microcode emulator) and it does indeed update A. e.g. if you do LDI 1 ACB 00 81 ACB 00 81 with zero memory A will not be 1 at the end.

*** Instruction ACB0 ****

PHASE 1: ---------------------------------------------------
Copy Program Counter => Memory Address Register

PHASE 2: ---------------------------------------------------
Copy Program Counter => Memory Address Register
Use High Byte MAR/PC
PHASE 3: ---------------------------------------------------
Copy RAM Memory =>
Use High Byte MAR/PC
Increment PC/MAR
PHASE 4: ---------------------------------------------------
Copy RAM Memory => B Register
Increment PC/MAR
PHASE 5: ---------------------------------------------------
Copy RAM Memory => Memory Address Register
Use High Byte MAR/PC
PHASE 6: ---------------------------------------------------
Copy B Register => Memory Address Register

PHASE 7: ---------------------------------------------------
Copy RAM Memory => B Register

PHASE 8: ---------------------------------------------------
Copy ALU A+B (Flags In) => A Register

PHASE 9: ---------------------------------------------------
Copy A Register => RAM Memory

PHASE 10: ---------------------------------------------------
Increment PC/MAR
PHASE 11: ---------------------------------------------------
Clear Instruction step

*** A Updated ***

Potential error in OS.TXT

In the listing code the following sequence occurs :

listweiter:     INW OS_PtrA
                  DEB OS_Count
                  CPI 8 BNE notmiddle
                    JPS OS_PrintSpace               ; print an extra space after 8 bytes
  notmiddle:      CPI 0 BNE nextlist
                    JPS OS_PrintEnter

This works because RTS changes A to an undefined value, which could, theoretically be 0, though I think A is set to SP.Low so it's very unlikely :) It should probably skip out past the CPI 0 test.

ULTRA2.0: which flash goes with which file?

I've been assembling the v2 ULTRA of this, and am at the point of burning the flash chips to add them. Apologies if I'm missing something obvious, but I don't see which of U6/U12/U30 goes with which of the lsb/msb/hsb files. Any help would be appreciated!

(also: I've looked through the [very helpful!] docs, but those focus on v1.6 or before --- if I get this started up, what would the baud rate for the serial port be? 115200? Something else?)

Thanks, and thanks for all the videos and interesting designs, @slu4coder .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.