Arduino Due CP/M Personal Computer

An affordable CP/M computer that anyone can make! CP/M for all!
*** A RunCPM Project***

Similar projects worth following
A CP/M compatible personal computer that anyone can build for very little money.
Uses an Arduino Due with a MicroSD adaptor with RunCPM by Marcelo Dantas.

Completed project!  CP/M for all!

Run WordStar or Dbase, play Zork or program in C or MBASIC!

A CP/M compatible microcomputer that is low cost and anyone can make!

I had been wanting to make my own CP/M computer for some time, I was very much inspired by other projects I'd seen like the RC2014 and even the Altair clone kits, but I wanted to make something that anyone could make for a low cost.

Marcelo Dantas had produced his brilliant RunCPM, this allows CP/M programs to run on a range of systems including the Arduino Due and uses the native filesystem of the host.   I'd imported some Due clones and SD card adaptors from eBay for a very small cost, probably not more than £17.  I am honoured that Marcelo has joined as a team member for this project, I recommend anyone with an interest in CP/M downloads RunCPM and compile it for their computer: Windows, Linux or Mac (as well as Arduino!)  RunCPM can be compiled with Lua support, this extends the scope and usability of CP/M using a modern programming language.

RunCPM Project

Since completing the build, I have also added a BASIC interpreter called Tiny Basic Plus - I've extended the functionality to support ANSI colour and simple block graphics.  Also, BASIC programs are accessible from CP/M, which can be started with a 'CPM' command.  Exiting the OS returns the user to BASIC.

Original source code for RunCPM and Tiny BASIC Plus.

  • 1 × Arduino DUE (32bit board with 96K) Approx £10-15 for a clone board
  • 1 × MicroSD SPI adaptor Approx £2
  • 1 × Project case Your choice, I had a project enclosure called a KE26 that I previously bought from eBay. Any plastic box or tub or enclosure of sufficient size will do.
  • 2 × Red LEDs Wired with resistor (for Power and disk activity). They can be bought in packs off eBay.
  • 1 × MicroUSB to USB cable

View all 6 components

  • Connecting the MicroSD card adaptor #2

    Martian05/30/2018 at 21:12 0 comments

    Generic MicroSD card adaptor used:

    Wiring diagram:

  • Connecting the MicroSD card adaptor #1

    Martian05/30/2018 at 21:10 0 comments

    I've had some posts about how to get the Arduino Due connected to the MicroSD card adaptor, the DUE uses a different wiring scheme compared to other Arduinos.

    Firstly I've used a widely available generic adaptor from eBay.  I cannot help with any other type that is wired differently.

    There are SIX pins as follows:


    These connect directly to the SPI header on the DUE (just above the logo):

    Connect CS from the SD card to PIN 4 on the DUE.  Leave RST(Reset) on the DUE unconnected.


  • Project status - Apr 14. 2018

    Martian04/14/2018 at 18:44 0 comments

    I've had some requests from people to join this project's 'team'.  If someone wants to do that, they would need to message me and give an idea as to why they want to join and more importantly, what they want to do, add etc.

    Although I will probably make little changes to my CP/M machine, it is marked as a Completed Project, unless I have a compelling reason to turn it back into an ongoing project.

    The instructions on how to make your own low-cost CP/M computer are provided and Marcelo Dantas' RunCPM is linked to on the main project page.

  • Upgrades Jan 27th, 2016

    Martian01/27/2017 at 12:28 0 comments

    I added a hardware reset button to the back of the unit, handy! One quick press and CP/M will reboot.

    Added a second LED

    Now there is a power-on LED

    ..and a disk activity LED

    When CP/M exits, they blink alternately until the USB plug is pulled or the Reset button is pressed.

View all 4 project logs

  • 1
    Step 1

    Marcello Dantas' RunCPM was flashed onto the Arduino Due. The MicroSD adaptor is connected via SPI. The good thing about RunCPM is that the SD card uses a standard PC filesystem, CP/M drives A to P are implemented as directories. This makes copying software and data over nice and easy. No arcane disk images.

    I tweaked RunCPM to my own tastes, minor things really like the displayed text on startup etc.

  • 2
    Step 2

    I bought a nice project case off eBay. I put some spacers in to mount a 3mm piece of plasticard that I would attach the Arduino and MicroSD adapter.I then drilled the appropriate holes.

  • 3
    Step 3

    Ready for the PCBs

View all 7 instructions

Enjoy this project?



guido.lehwalder wrote 10/26/2018 at 19:18 point

How can we get/compile RunCPM 3.1 - ADCPC R2.0 with TinyBASIC?
"The underlying code (RunCPM and Tiny BASIC Plus) has been updated to the latest upstream versions (3.1 and 0.15 respectively)."

  Are you sure? yes | no

Martian wrote 10/26/2018 at 19:47 point

If building a pure CP/M system, just use Marcelo's latest RunCPM build as he supplies it for the Due with a MicroSD SPI interface, that is my primary recommendation to everyone.

The additional stuff I'm doing with TinyBASIC Plus is VERY experimental, subject to MAJOR revisions.  I may even scrap TinyBASIC, if I can find something better or make hardware changes, it's a work in progress.  I don't have time to provide support or fix bugs for people at this point.

  Are you sure? yes | no

guido.lehwalder wrote 10/28/2018 at 15:37 point

I did compile the actual v3.3  from github for my Arduino DUE.
After some problems with "BDOS Error" i also got the Windows-Version working again (magic self healing?) - but cant compile it myself with TDM-GCC or MinGW32 :(

  Are you sure? yes | no

Martian wrote 10/28/2018 at 16:15 point

Hi. I can't reply directly to your last comment, instead send me a message and we'll see what we can do.

  Are you sure? yes | no

villaromba wrote 10/12/2018 at 15:18 point

BTW How did you get TinyBasicPlus to run on Due? I get avr/io.h error - i.e Due not an AVR

  Are you sure? yes | no

Martian wrote 10/12/2018 at 16:20 point

Contact me via the message system and we'll see what we can do.  :)

  Are you sure? yes | no

villaromba wrote 10/12/2018 at 13:17 point

This is a really interesting project running on my Due and I look forward to seeing the integration of the colour graphics side. Will now play with the tiny basic ......

  Are you sure? yes | no

fabian wrote 07/19/2018 at 15:20 point

Meybe zx spectrum version?

  Are you sure? yes | no

joseluis.collado wrote 06/04/2018 at 02:15 point

Hi Martian, very nice project, specially for the added TinyBasic functionality and color support. I'll appreciate if you could share this modified code.

Regards, JL

  Are you sure? yes | no

Peabody1929 wrote 05/29/2018 at 22:09 point

The ISP connector has the pins needed for the SD Card interface except Card Select.

  Are you sure? yes | no

jharre wrote 04/22/2018 at 17:48 point

This is cool! I've got the parts, but can't figure out how you wired the SD card board. Can you share which pins on the Due go to which pins on the SD adapter board?

  Are you sure? yes | no

Martian wrote 05/15/2018 at 22:20 point

I'm SO sorry I failed to see this post, did you get it working or do you still need help?

  Are you sure? yes | no

jharre wrote 05/29/2018 at 16:09 point

Yes, I did eventually get this to work with a Sparkfun SD adapter board. (With the Due, you have to bend out pins D11, D12, D13 before plugging in the adapter and use pin 8 for CS.) But, it would be nice to see how you wired the SD card board to the Due with the jumper wires.

  Are you sure? yes | no

Martian wrote 05/30/2018 at 21:15 point

I've added a couple of project logs to show how I connected mine up.

  Are you sure? yes | no

jharre wrote 05/30/2018 at 23:27 point

Ah! That looks good - easy to follow how you did the connections now. Thanks!

  Are you sure? yes | no

Arawn Davies wrote 01/18/2018 at 19:57 point

Hi, great project! I've just put RunCP/M on an Arduino Due after waiting months for my Micro SD card adapter to arrive. Do you plan on making this open-source at any point? If it was hosted on GitHub or something like the main RunCP/M project is, more people can contribute to it if you wanted. I respect your decision not to, just in the event that you don't :)

  Are you sure? yes | no

Martian wrote 01/26/2018 at 10:10 point

I could do.  The project was originally to run vanilla RunCPM following Marcello's work.  I've just extended it with a custom TinyBASIC for my own use, it's really a messy hack.  I'm focussing everything on my custom CPU project right now, but I do come back to this every now and then.

I'm not sure I want to get into a forked RunCPM project as such, because I don't understand all of the code and I have too much respect for Marcello's work.  I would have to make time to tidy everything up, but essentially I'd probably share stuff and explain how to modify vanilla RunCPM, it's essentially renaming loop and setup to cpmloop and cpmsetup so they can be manually called by an customised TinyBASIC keyword.

And all of this is affected by whether I make further hardware changes, I am -considering- making the machine standalone by adding a "$5 graphics card", ie. Pi Zero:

It also opens up possibilities for remote wireless connection and maybe connecting to the outside world.

  Are you sure? yes | no

Arawn Davies wrote 05/17/2018 at 23:30 point

Thanks for the tip, I'll give it a go and dabble more into it. I'm also considering moving onto a real Z80-based microcomputer that cna run at least MBASIC - bought the RC2014 Starter Kit without realising that it only came with the PCBs, a few headers and the MBASIC ROM, so I might be able to do something with what I've got already.

  Are you sure? yes | no

guido.lehwalder wrote 09/26/2017 at 10:17 point

Hi, whats the name of the blue terminal-font in the banner pictures (its not the glass-tty-vt200). It looks like a OCR A font, but OCR A hasnt the point inside the number zero.
I did built myself a RunCPM, but I didnt see files for your project (only the vt220-ttf).
Are there any - anywhere? :)

  Are you sure? yes | no

Martian wrote 09/26/2017 at 14:40 point

The font I was using is here:

It's based on the IBM 3270 terminal font.

RunCPM comes from the wonderful work by Marcello Dantas:

The BASIC thing is still very much a work-in-progress and I'm not planning on sharing files until the project is -complete-.   It's a messy kludge of TinyBASIC Plus (heavily customised) and a slightly altered version of Marcello's RunCPM.  I'm still changing a lot of stuff - frequently, I may even change the BASIC interpreter if I can find a better one that is easily modifiable.  I am also looking into adding more software features and hardware.

  Are you sure? yes | no

FloppySoftware wrote 06/29/2017 at 20:19 point

Very nice project!

I'm glad to see that my humble TE text editor for CP/M is useful for somebody!

  Are you sure? yes | no

Martian wrote 09/14/2017 at 14:23 point

My apologies for not replying before.  My sincerest thanks to you for TE, it's a very useful program and it's great to see new software on the venerable CP/M OS.

  Are you sure? yes | no

Marcelo Dantas wrote 01/25/2017 at 00:18 point

This is simply AWESOME!!! Looks like the real thing, I just had a trip down memory lane right now.

Honored that RunCPM is behind such a beautiful machine.

  Are you sure? yes | no

Martian wrote 01/25/2017 at 06:54 point

Thanks, and thanks to you for RunCPM.  The machine is a joy to use, I'm gonna get many years out of it.  I've been doing some distraction-free writing on it.  I've also to look into the Lua aspect of it, but that sounds really interesting.

  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