Close
0%
0%

68k-MBC: a 3 ICs 68008 homebrew computer

An easy to build homebrew SBC with a 68008 CPU. Two HW options: Lite and Full. Lite allows to build a 3 ICs 68008 system running CP/M-68K.

Similar projects worth following
The 68k-MBC is an easy to build 68008 CPU SBC (Single Board Computer), using only easy to find TH parts.

It follows the same "concept" of the previous Z80-MBC2 (https://hackaday.io/project/159973) and V20-MBC (https://hackaday.io/project/170924) boards, using a PIC18F47Q10 MCU as EEPROM and "universal" I/O emulator (so a "legacy" EPROM programmer is not needed).

You can choose between two main HW configuration options: Lite or Full. Lite HW configuration option allows to build a 3 ICs 68008 system running CP/M-68K.

It has an optional on board 16x GPIO expander, and uses common cheap add-on modules for the SD (HD emulation) and the RTC options.

Having two onboard RS232 serial ports, it allows to connect RS232 terminals like uTerm-S (https://hackaday.io/project/176716).

It is compatible with the uTerm (https://hackaday.io/project/165325) and uCom (https://hackaday.io/project/165709) add-on boards.

* NOTE TO THE READER *: Due to a text size limitation of the Hackaday. io site a few chapters have been moved to "Log files". In this case you have just to click on the link of the chapter's title to open a new tab and read it.


* * PROJECT STATUS (18/04/2023) * *

HW:

  • Released all the HW related files (see the FILES section);
  • Added the USING A SMALL THERMAL PRINTER chapter;
  • Added the USING A uTERM2-S RS232 TERMINAL chapter;
  • Added the SPP (STANDARD PARALLEL PORT) ADAPTER BOARD chapter;
  • Added documentation to build the SPP Adapter board (A240721-R270921). See the FILES section.

SW:

  • Released all the SW related files (see the FILES section);
  • Updated IOS S310121-R130421 and SD-S310121-R130421-v1.zip (see the FILES section);
  • Added the complete collection of the 4 Manuals of CP/M-68K (see the FILES section);
  • Updated IOS S310121-R150421 and SD-S310121-R150421-v1.zip (see the FILES section);
  • Added the SW/FW for the Arduino Uno PIC programmer, including the "ICSP Shield" board (see the paragraph: FLASHING THE FIRMWARE WITH AN ARDUINO UNO AS PROGRAMMER);
  • Updated SD-S310121-R150421-v2.zip (see the FILES section);
  • Released a working experimental doker image for a gcc cross-compiler toolchain (See the paragraph: SLOAD: HOW SETUP A "DOCKERIZED" GCC + NEWLIB CROSS-COMPILING AUTOMATED TOOLCHAIN (LINUX));
  • Updated IOS S310121-R250521 and SD-S310121-R250521-v1.zip (see the FILES section);
  • Added the 68000 IDE installation files and the custom cstart.asm file for the 68k-MBC (128/512/1024KB versions. See the FILES section);
  • Updated SD-S310121-R250521-v2.zip (see the FILES section);
  • Updated IOS S310121-R010721 and SD-S310121-R010721-v1.zip (see the FILES section);
  • Updated IOS S310121-R220721 and SD-S310121-R220721-v1.zip (see the FILES section);
  • Updated IOS S310121-R231021 and SD-S310121-R231021-v1.zip (see the FILES section);
  • Updated SD-S310121-R231021-v2.zip (see the FILES section);
  • Updated SD-S310121-R231021-v3.zip (see the FILES section).



* * THE PROTOTYPE * *

In the first phase of the design I've used a prototype on a breadboard to check the basic "concepts".

I've used as "companion" MCU a PIC18F47Q10 on a custom board (PicOne) I previously made and that it is directly pluggable on breadboards, and with onboard microSD card and USB-serial adapter.:

To make the firmware for the PIC18F47Q10 I've used MPLAB X IDE with the MCC plugin.

Here a short video with an automated assembler toolchain using Easy68K as assembler and sLoad, a custom SW utility to load from the serial port and execute a Motorola S-record formatted executable:


To allow a real automated toolchain an auto-reset circuit on the breadboard takes the DTR signal from the serial-USB adapter and uses it to reset the MCU (like in the Arduino Uno board), so it is possible reset the breadboard from a batch file running in the PC using a macro of Tera Term.


* * WHY A PIC? * *

Those have followed the previous Z80-MBC2 and V20-MBC boards will note that I haven’t used here an Atmega MCU. Using an Atmega MCU allows to use the friendly Arduino IDE and many ways to flash the MCU, so this is an enabling factor.

Unfortunately Atmega MCU GPIO ports are not TTL compatible, and this limitation was solved in the previous boards using a CMOS CPU that under given conditions can accomplish the digital levels of the Atmega MCU.

But here the 68008 CPU isn’t available in CMOS technology at all, so an Atmega MCU cannot be used.

So I’ve done some searches to find an alternative MCU having three main constraints: must have TTL compatible GPIOs (I mean strictly "guaranteed" TTL compatible), must be a TH part and cheap too.

The only part I’ve found was a PIC18F47Q10 MCU, and I must say that it accomplish the previous constrains very well. More, it is a modern MCU with lot of interesting features and more flash and RAM memory than the previous Atmega32 MCU.

Of course nothing comes free, and the choice of a PIC18F47Q10 brings some complexities. The first is the need...

Read more »

SPP Adapter board - A240721-R270921.zip

All the documentation needed to build the SSP (Standard Parallel Port) Adapter board (A240721-R270921) including schematic, PCB assembling guide, Gerber files for PCB production. PCB is 55mm x 60mm 2-layers.

x-zip-compressed - 747.10 kB - 11/06/2021 at 10:10

Download

S310121-R231021_68k-MBC_IOS.X.production.hex

The IOS in executable format (.HEX). This executable file is intended for the use with MPLAB IPE (or any other equivalent SW) to program the PIC MCU directly.

x-hex - 87.37 kB - 11/05/2021 at 18:29

Download

S310121-R231021_68k-MBC_IOS.X.zip

The sources for the IOS (with the needed libraries). Unzip into a folder and open with MPLAB X IDE (I've used version v5.45. No warranty that it will work "out of the box" with newer version of MPLABX IDE!). IOS must be uploaded into the PIC18F47Q10 flash. See the CHANGELOG section on main.c source for more info on changes.

Zip Archive - 2.01 MB - 11/05/2021 at 18:30

Download

SD-S310121-R231021-v3.zip

The content of the microSD for IOS S310121-R231021. See the CHANGELOG.TXT file inside the SD root for more info on changes.

Zip Archive - 2.34 MB - 04/18/2023 at 17:22

Download

EF06120-A2-user manual.pdf

QR203 printer commands (it is referred to another model but the commands seem to be the same of this one).

Adobe Portable Document Format - 424.74 kB - 07/23/2021 at 17:57

Preview

View all 13 files

  • * * SPP (STANDARD PARALLEL PORT) ADAPTER BOARD * *

    Just4Fun10/10/2021 at 09:03 2 comments

    * * SPP (STANDARD PARALLEL PORT) ADAPTER BOARD *  *

    The Standard Parallel Port (SPP) Adapter board allows to use the GPIO port of the 68k-MBC as a standard printer parallel port.

    In this way you can use a legacy parallel (Centronics) printer.

    To connect the SPP Adapter board to the GPIO connector of the 68k-MBC board you need a 10cm long 20 wires flat cable terminated with an IDC connector at both sides (pay attention to connect the cable in the right way on both sides, so the pin 1 on the 68k-MBC GPIO connector corresponds to the pin 1 on the SPP Adapter board GPIO connector).

    Please note that you have to power off the 68k-MBC board before connecting or disconnecting the SPP Adapter board to it.


    NOTE:
    before using the SPP Adapter board (A240721-R270921) you have to update both the IOS firmware and the SD image to the latest available version (see the FILES section).

    In the following image the SPP Adapter board with the flat cable (connected to the GPIO connector of the 68k-MBC) and with the printer cable:

    The cable to use for the printer is the common parallel printer cable, with a DB-25 connector at one side and a Centronics connector at the other:


    HOW TO BUILD IT

    In the FILES section you can find a zip file with all the documentation needed to build the SPP Adapter board, including the Gerber files for the PCB production.


    HOW TO USE IT: THE SPP CP/M-68K UTILITY

    To enable the SPP Adapter board under CP/M-68K I've added on the drive B: the custom utility SPP.68K (and the source SPP.BAS).

    You have to execute the SPP utility to enable the SPP Adapter board and "link" to it the LPT: CP/M device inside CP/M-68K. After the execution of the SPP utility the GPIO port will be linked and reserved (the "normal" GPIO opcodes/functions inside IOS will be disabled) to the SPP parallel port emulation until a system reset or reboot:

    After the execution of the SPP utility you need to link the LST: logical device to the LPT: device with the CP/M command STAT LST:=LPT:


    At this point you have a working printer parallel port on LST:, so if you give the Ctrl-P command all the console output will be echoed to the printer:


    NOTE:
    The SPP utility will output an error message if the GPE (GPIO Expansion) option is not installed.


    HOW TO USE IT: GCC EXAMPLES

    I've added a couple of source examples in the SD image (/gcc-68k/workdir directory) to show how to use the SPP Adapter with the gcc cross compiler.

    The two source examples are getStatusSPP.c and writeTestSPP.c, and they are the ones I used for the first test of the SSP Adapter board:


    WHERE TO GET A PCB

    I've prepared an "easy" link to get a small lot (5 pcs minimum) of PCB of the SPP Adapter. The link is this one.


    HOW TO GET A KIT OR AN ASSEMBLED UNIT

    If you are looking for a kit with all the needed parts or an assembled unit ready to use now there is a professional seller that can sell both and ship worldwide.

    The link to the seller is this one.

  • * * USING A uTERM2-S TERMINAL * *

    Just4Fun09/10/2021 at 15:30 0 comments

    * * USING A uTERM2-S TERMINAL *  *

    I've just relesed the uTerm2-S, a new multi-emulation color RS232 terminal for the 68k-MBC (but not only...). It is based on a ESP32 cheap module and is designed to use the FabGL library.

    More info on the uTerm2-S can be found here.

    The following image shows the uTerm2-S (previous PCB revision) connected to a 68k-MBC using the custom RS232 cable (A020221) previously described:

    Here I've set the screen of the uTerm2-S to 132 columns x 75 rows to have a large display area:

    In the following images a 68k-MBC powered with a uCom add-on board and connected to a uTerm2-S terminal (here the terminal was set to 128 columns x 40 rows):

  • * * USING A SMALL THERMAL PRINTER * *

    Just4Fun07/20/2021 at 17:25 0 comments

    * * USING A SMALL THERMAL PRINTER * *

    It is possible to find "around" cheap little thermal printers like those used to make receipts. The model name of the one I've used here should be QR203.

    These printers typically have an RS232 serial interface, so you can connect it to the 68k-MBC  thru the second RS232 port and use it as a little system printer (i.e. activating the "hard copy" with the CP/M command Ctrl-P):

    These printers are normally sold with two cables, one for the power and one for the data (RS232 or TTL). I suggest to cut both cables in the middle so you'll get two pieces (with one side already connectorized on the printer side) for each type.

    To connect the printer to the RS232 port 2 (J4/AUX) of the 68k-MBC you have to make a custom cable using an half data cable connected to a 3 pin Dupont connector as in the following photo (I've just soldered three wires with one side already connectorized with a Dupont terminal, then isolated with a heat-shrink tube):

    Here the table with the connections between the RS232 connector on the PCB printer side (5 pin) and the Dupont 3 pin connector (for J4/AUX):

    Only GND and RX are really needed, anyway I've connected also TX.

    The pin 1 of the Dupont connector (RX) is the one marked with a white dot on the photo.

    The pin 1 of the 5 pin RS232 connector on the printer PCB side is the one on the left (black wire) on the previous photo.

    This way it is ready to be connected to the RSR232 port 2 pins of J4/AUX as the RS232 custom cable (A020221):

    To power the printer I suggest to use a 9V 3A power supply adding a silicon diode (at least 3A rated) in series to protect against polarity inversions and to lower a little the voltage (9V is the maximum voltage for this printer).

    Remember to set the speed of the serial port 2 at 9600 bps, as this one is the standard operating speed for this model.

    I've done a little utility (SETPRINT.68K) to set the printer to 42 columns using a smaller font and to set bold characters for a better readability (it is in the drive B: together with the source SETPRINT.BAS for the CB68 Basic compiler):

    In the Files section I've uploaded a manual with all the commands for this printer (it is referred to another model, but the commands seem to be the same of this one).

View all 3 project logs

Enjoy this project?

Share

Discussions

esiako wrote 06/21/2021 at 09:40 point

Fuzix.org can run on this device?

  Are you sure? yes | no

Just4Fun wrote 06/21/2021 at 17:17 point

Theoretically I think yes.

  Are you sure? yes | no

esiako wrote 06/24/2021 at 09:04 point

We waiting for mobile version with fuzix ;)

  Are you sure? yes | no

sergei kovalenko wrote 06/19/2021 at 05:22 point

Hello! I have a problem. The loading stoped at:

68k-MBC - A091020-R140221

IOS - I/O Subsystem - S310121-R150421

IOS: Full HW configuration detected
IOS: Found RTC DS3231 Module (15/04/21 15:56:53)
IOS: RTC DS3231 temperature sensor: 21C
IOS: Found GPE Option
IOS: CP/M Autoexec is OFF
IOS: Loading boot program... done
IOS: 68008 CPU is running from now

sLoad - S-record Loader - S180221
1024KB - Full HW configuration
Waiting input stream...

Please help.

  Are you sure? yes | no

Just4Fun wrote 06/19/2021 at 11:41 point

To run CP/M-68K you have to select it from the boot system menu (press RST + USER key, then release RST holding down USER until the menu appears).

  Are you sure? yes | no

sergei kovalenko wrote 06/19/2021 at 13:55 point

Thank you very much! It works now ;) 

I love the board! :) 

  Are you sure? yes | no

gkaufman wrote 05/29/2021 at 20:28 point

I'm trying to get a handle on why the P8's don't seem to work here - and seem to work for others.

I've now built up 3 "Full" and 1 "Lite" boards with the UTerm adapters.

I have PIC's with date codes 21070RU and 19309HU

I have 5 MC68008P8's and 3 MC68008P10's with various date codes.

The 3 MC68008P10's work fine in all boards, the 5 MC68008P8's fail in all boards.

I've also tried 74HCTxx and 74ACTxx TTL

I've tried 512K and 1mb in the "Full" boards.

I've tried several different SD cards.

I've tried with and without the RTC board

I've tried with and without the MCP23017 I/O

Any other ideas to try??

  Are you sure? yes | no

Just4Fun wrote 07/03/2021 at 09:06 point

Last IOS revision fixed your issue.

  Are you sure? yes | no

marazm wrote 05/21/2021 at 13:18 point

I possible run OS 7 on this device? Many people woul be rewrite ROM if get working prototype

or meybe PalmOS? https://dmitry.gr/?r=05.Projects&proj=27.%20rePalm

  Are you sure? yes | no

Just4Fun wrote 05/21/2021 at 14:50 point

Hi, I don't know the HW requirements for the above OSes, but it should be possible to run any OS that uses 68000 machine code @ 8MHz and can be fitted in 1024KB of RAM (Os + user space, no MMU) and uses  block devices for disks and serial ports and terminals for I/O. There is no ROM/EPROM as the boot program is loaded from SD by the 68008 "driven" by the PIC MCU, then a reset is made to let the CPU run normally.

  Are you sure? yes | no

marazm wrote 05/29/2021 at 18:03 point

can You add rom and trying run macintosh classic SE mac os 7.* ?

  Are you sure? yes | no

villaromba wrote 05/19/2021 at 17:56 point

I completed my build today but have the same problem as a few others  (Facebook) I I keep re-booting I can occasionally get the complete menu but only option 6: works. All  other attempts give

IOS: Current Disk Set 0 (CP/M-68K v1.3)
IOS: Loading boot program (CPM68.BIN)...
IOS: CPU bus fatal error code: 2 – Aborted

68k-MBC - A091020-R140221
IOS - I/O Subsystem - S310121-R150421
IOS: Full HW configuration detected
IOS: CP/M Autoexec is OFF

 IOS: Select boot mode or system parameters:

 0: No change (2)
 1: sLoad
 2: Enhanced 68K Basic
 3: Autoboot
 4: Load OS from Disk Set 0 (CP/M-68K v1.3)
 5: Change Disk Set 0 (CP/M-68K v1.3)
 6: Change serial ports speed
 7: Change CP/M Autoexec (->ON)

Enter your choice >4  Ok
IOS: Current Disk Set 0 (CP/M-68K v1.3)
IOS: Loading boot program (CPM68.BIN)...
IOS: CPU bus fatal error code: 2 – Aborted

All 3 ICs from Mouser  with batch code 19309HU
It seems as though there are a few anomalies somewhere !!!

@Fabio I'm happy to send you one of the ICs if it helps identify this problem

  Are you sure? yes | no

Just4Fun wrote 05/20/2021 at 07:34 point

Hi, it seems that there are a few (at least up to now) cases like yours. I haven't had this issue up to now, and the same for the person who sells the kit (and there are others who have successfully assembled the board and also using the same 19309HU batch as this one: https://www.eevblog.com/forum/vintage-computing/68k-mbc-a-3-ic-easy-to-build-68008-sbc-running-cpm-68k/msg3568169/#msg3568169 ), so this might be a good idea as I can't try "to understand" something that I can't "see". I sent you a message.

  Are you sure? yes | no

Just4Fun wrote 05/20/2021 at 10:13 point

Hi, some days ago I received another batch of PIC and forgot about it...

I've checked just now and they appears to be the same batch of yours (19309HU).

So I've tried one in a 68k-MBC board with a MC68008P8 ad it works perfectly... (see photo here:  https://postimg.cc/YjZN3jgZ).

  Are you sure? yes | no

villaromba wrote 05/20/2021 at 13:59 point

Thank you for trying. I AM NOW FULLY WORKING!!!  After trying power from usb, a powered usb, a Rapsberry pi PSU (5v 2.5A) and finally a Raspberry pi PSU 5.2v 2.5A  all is good. Sorry for all the fuss but it seems  that the right and adequate power supply is the solution ...... for me any way !!!

  Are you sure? yes | no

gkaufman wrote 05/20/2021 at 16:57 point

I don't think it's the PIC - I have two boards built up from the same Mouser order of parts.  Both work fine with a MC68008P10 and have the same CPU bus fatal error code: 2 error with a MC68008P8.  Both are USA sourced used CPU's.

The system will often boot up once when the MC68008P8 is cold, but then fails repeatedly until the CPU cools off.  I'm suspicious that the timing is marginal for the P8's.  I have two more MC68008P10's on order - but as they are from China the real speed ratings are unknown.


I use the uTerm board for power and i/o, with a reasonable quality 9VDC supply feeding the uTerm. 

I haven't tried lowering the clock rate, as I'm waiting for the additional MC68008P10's to arrive first.

The running system is VERY nice!!

Addendum -= after seeing the note above I tried the MC68008P8 system off of a HP/Agilent power supply  - no difference with a high quality supply or varying the voltage from 4.8 --> 5.5vdc

The same board is rock solid with the MC68008P10.

  Are you sure? yes | no

Just4Fun wrote 05/20/2021 at 14:06 point

Great!!! The MC68008 is not a CMOS CPU like the previous one, so it is more picky about the power (and also it drains more...)

So only the last one PSU worked?

  Are you sure? yes | no

villaromba wrote 05/20/2021 at 14:25 point

Yes, the others 'worked' but gave the error message as above., so couldn't do anything. The final one 100%. ........... (sigh of relief !!!)

  Are you sure? yes | no

Russell Leu wrote 06/19/2021 at 04:38 point

I was able to get mine running today, and it's also a 19309HU PIC18 - I flashed it while connected to a powered USB hub.  The 68000 is a power hungry chip and was quite warm after a few hours.  Trying to run it on an unpowered hub was impossible.  

  Are you sure? yes | no

gkaufman wrote 05/10/2021 at 14:31 point

PicKit3 "clone" worked easily to program the PIC18F47Q10, so another inexpensive option.

Boards went together nicely, thanks for another fun project!

I had 2 cpu's here - a MC68008P10 worked perfectly, but a MC68008P8 hangs detecting the BUS.  Do you think it might be speed related?  I built up 2 boards and it occurs with both (and the MC68008P10 runs fine in both).

  Are you sure? yes | no

villaromba wrote 05/10/2021 at 15:17 point

That's good news! I have a PicKit3 which I'll try and remember how to use again. I have all parts now for my board except the PCB which should arrive from China anytime now. 

  Are you sure? yes | no

Just4Fun wrote 05/11/2021 at 08:14 point

Hi, strange... I'm using a MC68008P8 on one of the three assembled boards without any problem. I've used another MC68008P8 also on the first prototype on breadboard (running @ 8MHz). The person who is making the kits and the assembled version is currently using the MC68008P8 without problems too (he is using the Pickit3 too...).

  Are you sure? yes | no

gkaufman wrote 05/11/2021 at 14:28 point

Perhaps I have a defective MC68008P8.  Is the circuit dependent on the xtal frequency or could I try a slower one?

  Are you sure? yes | no

Just4Fun wrote 05/12/2021 at 12:01 point

The serial ports and some parts of the code are time dependent, and were tuned for a CPU clock @ 8MHZ and a MCU clock 64/4MHz. So I'm not sure if the whole thing can work using i.e a 8MHz (instead of 16MHz) quartz.

You can just try it with the MC68008P10 at first (remember that the default serial speed will be 57600 bps) and check if it works. If it works then you can try to use the MC68008P8.

  Are you sure? yes | no

Just4Fun wrote 05/20/2021 at 10:41 point

I've just ordered another MC68008P8 to try it  (instead of a MC68008P10)...

  Are you sure? yes | no

brane331133 wrote 04/13/2021 at 18:40 point

So, going off 68K already ?

Shame. 68SEC000+ that PIC could make great two-chip QL...

  Are you sure? yes | no

proto raven wrote 04/13/2021 at 11:17 point

Is there a native C compiler for this setup like there is for the z80-MBC2?

  Are you sure? yes | no

Just4Fun wrote 04/13/2021 at 13:21 point

Yes, there is the DRI C compiler that was released with the CP/M-68K distribution disks. I've added also the DRI CBASIC compiler. I've found also another C compiler, but not tested yet. Also FORTH83 is available around.

  Are you sure? yes | no

brane331133 wrote 04/12/2021 at 21:24 point

It's not true that you can't have 68008 in CMOS flavor.

You can have 68EC000 (5V)  or 68SEC000 ( 3.3V). Both have internal de/multiplexer that can be activated by strapping one pin to GND (IIRC) after which a chip behaves like 68008.

It also seems that you could have done good part of video circuitry and more with PIC.

Perhaps keyboard scanning etc. AND SRAM emulation.

PIC32MK1024GPE100 is $6-ish apicece and could do most of that, icluding DMA transferes to internal and external memory, COM ports, OTG USB, RTC etcetc.

  Are you sure? yes | no

Just4Fun wrote 04/13/2021 at 08:53 point

Hi, thanks for the info!

I've used here the most simple and cheap parts available, so only DIP TH parts (as for the others XXX-MBC boards).

I've in my "to do" list (might be the next thing...) another board "to make experiments" with a 68SEC000 CPU, a STM32 MCU and a Cyclone IV FPGA. Of course will be a more complex board (likely 4-layer PCB and all SMD) to build.

  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