Following Motorola’s launch of the 6800 around 1974, a number of 6800 monitor systems emerged. The system I recall using, in the late 1970s, was the SWTPC6800 . These systems were terrific but quite bulky. Such systems, utilising the 6800, required a whole heap of additional components such as Clock, PIA, RAM, ROM, UART(ACIA). The ROM contained monitor code such as Motorola’s MIKBUG.
At that time, I had just started an electrical apprenticeship, which included college day release and evening classes. Being interested in electronics, my employer kindly enrolled me in an “Industrial Electronics” course. I cannot thank that employer enough for such a great start in my lifelong electronics journey.
I was introduced to the Motorola 6800 CPU, and I was hooked. The 6800 had only been released in 1974 so it was the “latest gear”. I learned to use a 6800 System Monitor and spent many happy hours writing machine code to simulate various systems and appliances. The SWTPC6800 was widely used to teach engineering and computer studies. The monitor software was called, as far as I can recall, MIKBUG, accessed via an RS232 terminal.
Having a basis of machine coding was incredibly useful, as it give a special perspective into how CPUs worked, right down to the registers. Later in life I started working with micro-controllers and found the Motorola core was still used in the Motorola 68HC series of micro controllers (MCUs). The Motorola semiconductor business because Freescale who later sold it to NXP. As of today, the 6800 Core is still actively produced and developed by NXP (the older generation of MCUs are discontinued).
It used to be possible to buy MCUs in small volumes (even single chips) when things were Motorola and Freescale. But that no longer seems to be possible, sadly….
But harking back to the SWTPC6800, there was always something special about working with machine code, and so I wondered if it were possible build something simpler that somehow emulated the machines of the 1970s.
Enter SiMON6800
Building a 6800/6801 system (like the 1970’s units) would be a big challenge. Not least because of component availability. But given the 6800 core was still alive and kicking in the form of the Microcontroller (which has the peripherals built-in), I decided to try building something around an HC908 microcontroller.
The 68HC908 MCUs do (or did) have a “monitor” program (“MON”) but that was intended for machine-to-machine flash programming (the later S-series MCUs replaced MON with USBDM).
I decided to write a new monitor using one of the HC908 MCUs (the HC908JL8), and created SiMON6800. It kinda does some of the MIKBUG functions, but I wasn’t attempting to replicate MIKBUG. After all, MIKBUG would load and store to/from paper tape! whereas the the MCU has flash…
Conveniently, the HC908 has a SCI for directly driving serial/RS232 thus removing one challenge (the accurate timing of bit-banging serial data).
What can SiMON6800 do?
SiMON6800 allow you to:
- Read bytes from anywhere in the memory map including IO ports which are memory-mapped, and to view blocks of bytes
- Write bytes to memory (RAM, registers and I/O ports), this is done in a sequential way for fast data entry
- Flood fill or clear RAM (128 bytes)
- Run a user program
- Add user breakpoints to view port and register data
- Save your programs to the MCUs flash (128 bytes).
- Recall your programs from the MCUs flash (128 bytes).
SiMON6800 also includes some useful user subroutines (e.g. timing loops, I/O, diagnostic break routines) to make life a little easier when writing user program.
Interrupts are also enabled and the monitor provides default handlers. The flash interrupt vectors point to RAM vectors to you can write your own interrupt handlers and routines.
The Stack Pointer is set to $0138, so you have over 200 bytes of RAM from $0060.
We provide four storage spaces in flash for your user programs, each being 128 bytes.
The hardware
The small SiMON6800 PCB accommodates the MCU, I/O, USB Serial, etc. The MCU used here (the HC908JL8) has SDIP pin spacing (i.e. not standard hobbyist 2.54mm/100MIL stripboard spacing). So, to make the project’s PCB more adaptable, the MCU is mounted in a SDIP to DIP converter and the SiMON6800 PCB accepts MCU in a DIP header (2.54mm/100MIL); the big advantage is that other MCUs can be used with an appropriate adapter board (this is for the future though). The MCU comes pre-programmed with the SiMON6800 software in flash.
The RS232 interface has been replaced with USB Serial, only because PCs have USB and can use terminal software like the excellent PuTTY.
The MCU ports are exposed in headers, as are IRQ, CLK signals, timers, and more. The raw clock is 9.8304Mhz.
What are the limitiations?
The HC908JL8 only has 256 bytes of RAM (MIKBUG had a “massive” 4k).
The limited RAM also has to accommodate the Stack and SiMON6800’s RAM variables. But nonetheless you have a decent 200+ bytes to play with. It’s sufficient for typing in machine code, and the included flash based subroutines also help keep the code trimmed. If you make a mistake, you can correct just the bytes you need (i.e. you don’t have to type in the whole thing again)
You cannot add directly addressable peripherals because the MCU does not expose the address and data buses. You are limited to the exposed ports, and inbuilt functions.
The system software cannot be upgraded without re-flashing the MCU. At this time, I don’t make the source code available, but might offer an upgrade/re-flashing service in the future if there is sufficient demand.
6800 versus HC908
There are, as mentioned earlier, some notable differences between the 1974 Motorola 6800 CPU and the HC908 (JL8 in this case). This sort of summarises the notable differences, but there are many more…
- The clock speed on the HC908 can be much faster (up to 32mhz), and its internal bus speed is clock/4. It was 1mhz or 2mhz on the 6800.
- The HC908 only has one Accumulator register, whereas the 6800 has two (with some A to B instructions).
- The 6800 had a single 16-bit Index Register, whereas the HC908 uses a combination of the H:X registers to achieve 16-bit addressing.
- The 6800 exposes its address pins so it can address 64Kb of space. The HC908 does not expose any address pins, so you are limited to what your particular MCU offers internally.
- The HC908 has more and some enhanced instructions, such as performing operation directly on the memory locations, and it has improved Branch instructions.
- The 6800 requires a (large number) of external peripheral chips (Clock, PIA, RAM, ROM, UART(ACIA) etc) to operate. The HC908 has all of those elements inbuilt, and offers more included capabilities.
- The HC908 also includes Flash memory to store programs and user data.
- The HC908 has less RAM (fixed at 256byte for the JL8).