This project is leftover from my love affair Motorola/Freescale/NXP HC08 MCUs. It was my third MCU type I actually used - PIC16F84 was first, then AT90S1200 and then MC68HC908GP32. I really like them, but few years from entering the market with big fanfare, marketing at Freescale decided to toss the HC08 into bin, remove it from development software and trying to convince the users about how much compatible are the incompatible HCS08. Now the HC08 are almost extinct and you can buy last supplies of them, for horrible prices. This was my last encounter with MCU from Freescale and I swore I'll never use anything from them. Now they are bought by NXP and I'm not sure what to do now :-)
No matter what, the HC08 keep stable place in my heart. I still have a few of them in my home stock and this programmer is my tribute to this nice little family of MCUs I'll never forget, rather than useful project.
As I stated in my project description, this project is perhaps not very useful for wide audience, though important to me, from nostalgic reasons. HC08 are dead by stupid Freescale's marketing decision, now after NXP merger it is even more dead and the only reason I'm doing this is my stock of HC08 devices as well as my memories of old days when all you needed (and actually had) to get MCU going was serial port, assembler and datasheet.
The HC08 was based on MC6805 MCU and it was based on MC6800 CPU, touching back to 70's. It keeps its "as small amount of registers as possible" architecture, familiar to 6502 users too and Von-Neumann memory arrangement, meaning RAM and FLASH in the same memory area, meaning you can execute from RAM and read "variables" from FLASH. The latter specifics was heavily used by the loading mechanism and so-called monitor mode.
By applying higher-than-usual voltage on IRQ pin the MCU listens to chosen pin to serial commands, allowng user to write/read memory and run the program, either from RAM or FLASH. To program the binary into FLASH, you load it into piece of RAM, the write fragment of executable to write the data from RAM to FLASH and execute the latter fragment to do the desired action. Sounds convoluted - and it gets worse than that, in reality :-)
This is starting point to MCU implementation, as the original had one major flaw - it relied on break signal generated from serial/USB converter, which doesn't always fit the HC08 expectations. I went the "just throw MCU for low-level system, the rest is just programming" route.
Currently I have device able to program, read and run binaries in MC68HC908KX2 MCU, using simple ASCII interaction with user, as I did it for my #PIC89PROG project. The beauty of this simple interface is that you can use it with no other software than serial terminal, on your Windows or Linux machine, or Altair8800.
Running from Cutecom in Linux - or Bray terminal in Windows.
This session shows entering programming mode and reading FLASH and RAM of the MCU, and letting the program to continue running. Peeking at internal RAM is useful as application debugger too.
Flashing blink a LED binary compiled by SDCC (yes, there is free C compiler for HC08) and loading via hc08prog...
* MC6808 is its successor, though it was never manufactured in NMOS version (6808), but in CMOS process (68HC08). By the way, MC68HC05 is CMOS variant of MC6805. MC68(HC)08 is improved version of MC68(HC)05, maintaining backwards compatibility.
* MC68HCS08 (=S08 shortcut), again improved version of MC68HC08
* RS08 is reduced version of S08 - some instructions are omitted and addressing space is smaller; intended for really low-end cheap MCUs
dear friend this very nice project and I am interested so can you send me more details I mean circuits diagram