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 (06/11/2021) * *

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).



* * 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 for an appropriate HW programmer to perform the flashing...

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). 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-v2.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 - 11/06/2021 at 12:42

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
Download

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

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