I really built a RAM bootloader for classic 68K CPU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I really built a RAM bootloader for classic 68K CPU

3,512 Views
tetsu_jp
Contributor I

I am interested to design a small 68K system and I am working at it for some years.

There are several prototypes (wire based) as well one PCB design using the 68SEC000.

 

One prototype is in working order to a degree where it can store data into 128K SRAM, and read it back.

The MCU for instance could use it's hardware serial port for download.

 

Recently I received really large proto PCBs, and I am playing with the idea to connect the RAM bootloader to a PLCC 68000.

There is really no EPROM (or EPROMs) here.

 

However the software to load data to the RAM and to control the tristate is lengthy, somehow.

 

It's a old CPU I know. I have various types of them around, some Hitachi HC 68K with 2mm pitch, some old CERDIP 68k from Signetics, and PLCC from Motorola.

 

I even made another prototype with USB MCU, and 68008.

 

However I am not sure about developement software. There is one PC software Easy68k I think, it is not very stable on 64bit Windows.

 

What is your opinion, should I try to get one prototype running, or is it worth the efforts at all?

 

I have been reading through the users manual many times, at one point of time I was considering to write my own assembler in Visual Basic, but then stopped with that developement. Mainly for the reason there is no concrete need for it to have my own assembler.

 

I bought a CLPD board + JTAG programmer + downloaded the software, and I also have two GAL programmers now.

 

The PCB design for the 68SEC000 is not much bigger than 6cm x 6cm, including powerful MCU (as bootloader), and static RAM as well a small CPLD.

 

What I believe while reading the user manual I learned a lot about programming, and developed many other interesting circuits, so it was a good improvement for me. I don't really know if it makes sense to put too much effort into it.

Wire based prototypes require a lot of soldering, and more and more soldering. And then I sometimes saw the design was not good even before completion. I have 3 or 4 of these prototypes around, for the 68000, one 8086 board as well.

Unfortunately I did not draw schematics for them :smileyembarrassed:

 

If you have any input, feedback, opinion, please write it.

The bootloader even has 2 LED panels for address+data bus, detachable. 

Labels (1)
0 Kudos
9 Replies

1,478 Views
vier_kuifjes
Senior Contributor I

You actually did what I wanted to do once. I did several wire soldered prototypes in the past but these were always built around a 6502 CPU. I know how much work it is to build such a prototype.

 

I never managed to build one around the 68000 though. I considered it too much work, as I wanted it to include RAM, EPROM and at least a UART. But I was scared it might not work. Bus timing, with all those wait states thingies etc. is a little more complex than it is with a 6502. And I don't have an oscilloscope to check things out (although I could use one from work).

 

And then I'd still have to learn the assembly language and find a good assembler...

 

But then those all-in-one coldfire microcontrollers became available, which eliminated the need to build my own 68K system. And that's what I'm using now! :smileyhappy:

0 Kudos

1,478 Views
tetsu_jp
Contributor I

It is a lot of efforts to wire them, yes.

 

I also wrote this post maybe someone can point me to a devkit or MCU that is similar to the 68K.

I look around on my own but I am undecided.

 

I think the PIC32 is more powerful already than the 68K CPU (it's not Freescale).

 

What I want to do in the near future is to use the PIC32 and the 68000 to run programs on my new LED matrix,

and observe the performance. 

 

I'm actually scared too the boards may not work as intended- it was a lot of debugging work to make the RAM bootloader work, including blatant wiring mistakes. So the (blank) proto PCBs I have now are really hudge, I can add labels to different types of wires/signals. I have more than one of the PLCC 68K available already started to build a plugable CPU module. 

 

Serial port, interrupts, waitstates- all not required, this can be done by the bootloader MCU. 

 

I could also put more efforts into the small 68SEC000 PCB however I want to make sure I understand it well enough. All the parts were already purchased, and manually added to PCB layout software. Sure I have to check the pins again 3 or 4 times. Recently I even figured out the SEC000 can use 8bit mode like the 68008.

 

I don't use breadboard I prefer soldering (even if I have some breadboard). No logic analyzer/oscilloscope here.

 

What I hope is if I can make one prototype working, the others will be much more easy.

 

Actually I remember now, originally I wanted to make some kind of 68000 cartridge for the z80-based SEGA master system. Back in 2004! A card with matching module slot connector existed, and the plan was to request a DMA cycle from the z80, and not to release it. The 68K then could access the video chip etc. freely. However no officially available documentation exists for this toy from the 1980s. Subsequently the original prototype was scrapped. I even have some 68901 serial I/O chips around, far too much power consumption, and very complicated to use.

 

Maybe it's good to obtain a coldfire dev kit I rather prefer to build circuits from scratch as I did with PICs.

I am looking forward to get a flash writer soon for the 9S08AW16 chips I have around. Codewarrior has been installed recently, I started it a few times. Sure soon I will understand more. 

 

Well I think in the past some Mitsubishi PLCs used the 68000, they don't use them anymore, generally the CPUs they use at least have a system clock of 150 Mhz. 

0 Kudos

1,478 Views
yibbidy
Contributor V

If you really want to use a 68K, do yourself a favour, go to http://www.robominds.com/ and buy one of the single board computers from there.  They are based on a MC68332, have 512KB flash, 512KB SRAM and serial comms etc for not much money, about $90.  Even better, get the kit with a bundled BDM for $129, you'll not have to worry about bootloaders and debugging is easy.  I've had one for years and it is good.  Not many 68k based development boards around now.

0 Kudos

1,478 Views
yibbidy
Contributor V

Oh, forgot to mention - it comes with the Motorola CPU32BUG monitor/debugger/bootloader installed, which is excellent and is better than what you or I could write ( sorry, I'm not being nasty, it's been around a long time and is a descendant from the monitors on the professional Motorola VME boards).  It will save you an enormous amount of work.  if you're learning it's great for reading memory locations/registers and seeing what is going on.

 

Good luck with your project, there is something special about the M68k :smileyhappy:

0 Kudos

1,478 Views
tetsu_jp
Contributor I

Thanks for your reply and the link for the RoboMind.

 

My 68k projects are not so much a consideration to learn assembler (I used assembler in the 1990s).

 

The biggest mental wall seems to be the design choices. What really is the best way to build an interface (not having EPROMs), keeping it as simple as possible (not too many chips or complicated firmware).

 

The prototype RAM loader I built isn't the best, it's a 44pin microcontroller, so latches are used.

 

However the PCB for the 68sec000 I already designed is more advanced than the RoboMind.

It has a PIC micro capable of upto 48MHz clock, and these larger PICs have powerful pheripherals as well,

even USB.

 

I was just thinking this morning, maybe I should change it to use the PIC32.

 

And the bill of materials is about $15.

 

It's not really easy to design a complete computer, including maybe a small color LCD.

What is the right RAM size, what is the right display size?

How to integrate the CLPD without tying it up too much, so the system could become extended later?

(I haven't got much CPLD experience yet).

 

Older GAL technology isn't so much favoured now, some manufacturer's discontinued them.

I had to buy two programmers, took me years to get it working.

 

On the other hand it seems to be, leaving the interrupts alone (all I/O done by the PIC),

and only using fast SRAM, the complicate acknowledge isn't much required.

And the SEC000 can work in 8bit mode (at some speed penalty), resulting in less PCB tracks.

 

It's easy of course just to go brute force, proceed with the PCB and simply order a small batch,

and see how it goes (maybe 150 dollars cost).

 

However, currently, I want to build it on a large proto PCB, abandoning the 4 or 5 existing prototypes (which suffer from lack of space and they don't have any schematics so it's time consuming to do further work on them).

 

I want to finish one CPU module, build a simple backplane (bus), and connect it to the RAM bootloader.

 

My goal is just to run a super simple small program on the 68k. These are 68000FN8 (PLCC), I use plugable CPU module for the reason so I could change the CPU if I wanted to.

 

I have some 68901 around but they aren't going to be used, sold some of them a few days ago! They are really consuming to much power (about 200mA). The SEC000 only needs 15mA.

 

To get to a point why I want to build this PCB and what will it be good for:

 

-It could become used for various applications, where it is considered more comfortable to have more than one CPU/MCU. RISC MCUs are good for some purposes however if you look at the disassembly (from C), you'll see for each line of C, you get 10 to 20 RISC instructions. Overall speed isn't so fast, after all.

 

I know the 68K isn't fast either (by nowadays standards), but I am also considering to have more than one 68K working at the same time.

 

The weak point is that no good software exists that works on current Windows, and has good documentation. The Easy68k can produce binary, sometimes it simply will freeze so that isn't really workable.

 

-The price tag could be somewhere around $20 to $30, including PCB.

 

Actually, I plan to create benchmarks, to compare for instance the 68K with a PIC32. I guess the PIC32 is far more powerful already.

 

If you remove the CPLD, and maybe only use a 18F PIC, and just a little RAM, and a smaller color LCD, the cost of components will go down, and so the PCB area!

 

Maybe there is some really optimal design, which still makes sense these days, based on the 68SEC000. For 15mA/3.3volts, it still seems to be a good CPU. Remind there are for instance 8051 compatible chips built into many commercially sold SD card readers. 

 

It is true there are not many new 68K designs. The only 68SEC000 design I saw on the net has something to do with emulation of a 1980s game console, which back then was much favoured by assembler enthusiasts (if we don't use the word hackers here).

 

Most people these days use CPU32. The only difficulty for me is that there are so many different architectures for them, and many different CPU models. I spent considerable time on the 68K already. It would take me 6 months to a year to become familiar with the CPU32.

 

Yes I could buy a evealution board. But it would be difficult to derive a design that I could replicate 10 or 20 times at relatively low cost.

 

After all I think in the near future I will also buy one of these evealution kits to keep up with "evolution".

I put so much effort into the 68K it's difficult for me just to abandon it, without having some real working prototypes, and without data for their performance, or just experience how they "behave" in real world.

 

Color LCDs using PICs are possible however there is only little RAM on most PICs! For instance I have some 1.8" TFTs, and some 320x200 color LCDs. I saw some digital camera PCBs, and they always have CPU/RAM/Flash ROM. However these CPUs are exotic, no datasheets can be found for these.

 

What I really developed to a working point are very small serial LED 7seg displays, originating from the RAM bootloader. One day I was just thinking, all these wires for the debug displays are way too much effort to cut and to solder, and relatively quickly I devleoped serial displays. They only use one PIC16f54 (50 cents), and no other components. The PCB actually fits underneath the display (0.36"). A very effective and useful developement.

 

So this is one of the results of working at 68K prototypes.

 

My difficulties are not so much to learn or to understand digital principles, or assembly programming, it seems to be most likely it's very hard to make design choices. There is no data which helps to make a descision! The only way to go seems to be to choose some design that makes sense, somehow, and see how it works, then improve it for cost and speed, and build more prototypes. 

 

I have also searched the internet over a time of some years to encounter various "homemade" CPUs, single board computers, even small gaming consoles. It's interesting and gives some impressions but for most cases it is the opposite and totally different from how I build things. For instance having EPROMs seems to be almost unthinkable.

 

The 68K is special yes there seems to be numerous mental barriers. I wonder sometimes what stops me just to add 1Megabyte SRAM, and simply proceed with the PCB design? Right now I only have 2x32K chips however these days the price tag isn't much relevant anymore.

 

The first application for my 68K prototype (wire based) most likely will be connecting it to my new 32x24 LED matrix.

 

I have attached one screenshot from the PCB design, each square is 1cmx1cm. The CPLD is connected to all memory control signals however the PIC isn't yet connected to the outside world most likely this will be done using flat cable connectors. It's just an idea how it will look like (and about the size).

0 Kudos

1,478 Views
yibbidy
Contributor V

The CPU32 is a 68K, it is a 68k with enhancements.  It has a few extra instructions which are better for embedded controllers.  It also has a SIM (System Integration Module) to help you with interupts and chip selects, reducing the number of support chips that you need.  You don't need to learn much new if you know 68k.  The 68332 also has a TPU which is great for robotics and real time control.

 

Regarding the 68SEC000, check out http://acube-systems.biz/index.php?page=hardware&pid=3 for a "modern" design using that chip. It has VGA out, PC keyboard and mouse etc, runs AmigaOS.  You might get some ideas there, it is an open source project.

 

Your PIC even at 48MHz is very limited compared to a low clock speed 68K, you really can't compare them.  That's not the case for a PIC32 of course as that uses MIPS architecture.

 

Remember that the "cost" of replicating your product is not just the bill of materials.  That might only be between 5% and 50% of the cost depending upon volume and market.

 

 

0 Kudos

1,478 Views
tetsu_jp
Contributor I

Thanks for your reply, yibiddy.

 

I am aware of the Amiga including to know the low level chipset, and the AmigaOS.

I used to have a (commercially purchased) emulator installed, but I don't put efforts into this anymore.

 

The PIC18 are powerful, including 8x8 hardware multiplier.

Instruction cycle is upto 12 Mhz, and single bit shift 1 cycle only.

They are not the same as for instance the 16f84.

 

For instance I would use the 18F PIC to prepare the data for the color LCD on the lowest level,

and the 68K can run the software application.

Working on bit fields the PIC needs 1 cycle where the 68K at least need 4 cycles for every instruction.

The addressing modes are more confortable, and there are more addressing registers, than on the PIC (they only have 2 pointer registers for RAM + one for the FLASH).

 

I don't really have in mind to mass produce my design or market it as quickly as possible.

I am under no pressure specifically to save on components.

 

My only interest is to minimize the design.

I hope for some input in form of replies. I don't have much need for instance to integrate VGA into the CPLD even if I have read about it, as I would be using a 320x200 color LCD very likely. Yet it's also interesting to have a CPLD "on-board" which in theory, could do things like that.

 

My system:

 

-no EPROM, RAM bootloader, can load from USB (or serial), or serial FLASH

-PIC18 as coprocessor to do low level data preparation

-no interrupts, the PIC halts the system regularily, and the I/O is memory mapped.

-CPLD to generate all the control signals for the SRAM

-3.3 volts supply

 

I have around somewhere a USB memory stick reader with integrated file system, which eventually,

also will become addedd to this computer. Saving the efforts to develope the file system software. 

 

One thing of course the PIC and the 68K can't access the RAM at same time. So the PIC must use internal RAM, or additional serial RAM ICs.

 

The Amiga in this matter, well, somehow multiplexed the memory bus, so the chips could access in parallel. In reality there was a penalty about 3x times slower, which you could observe, when you added "Fast RAM".

 

I am not sure if I want to multiplex the memory bus in that fashion!

 

It would be possible using the fast CPLD, because the PIC isn't accessing it very fast (needs to update the address pointer). I am not sure if such tricky programming is needed for my system. There are PICs including the one I use here which have hardware memory bus, it's also possible completely in software. Indeed the generation of the control signals is not so easy having these two MCU/CPU together on the same bus. A CPLD seems to be the best way to do it fast.

 

Originally I use latches (not to need update the upper bits of the address pointer, only the lower 8 bits for each 256 bytes). I have not yet worked out to move these into the CPLD :smileywink: 

0 Kudos

1,478 Views
tetsu_jp
Contributor I

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=TWR-MCF51JF

 

would this be appreciate to buy, relating to the above explanations?

 

I mean to understand more about Freescale MCUs?

Not to build it directly into my system...

 

If you have any other product to suggest?

 

And can I use this PCB just on it's own, or what do I need?

 

I have around one small demo PCB (built 2003, Motorola), carrying a 8-pin IC,

but the software that was included can not work anymore on modern Windows.

And in another thread I have read the HC08 is outdated, somehow.

 

As far as I understand, I need something more powerful. 

0 Kudos

1,478 Views
tetsu_jp
Contributor I

Reading the 68K manual many times was an inspiration for me.

For instance in 2008 I built first prototype for serial computer, having 4 or 5 small MCUs.

Many LED resistors here, but it worked.

 

The 68KUM was my main paper so to say, the design in some aspects directly relating to it.

 

There are now even small serial SRAM ICs, 32 kbyte each.

4 digit serial displays are available as well, also designed because needed by this project.

 

So maybe people think it's outdated technology, for it's still useful to work with it, and derive other designs, having an advance in technology even these days.

 

In 2010 I built an (incomplete) prototype, kind of a message in space, using no microcontroller!

It turned out when I draw logic equtations on one paper sheet, it could form the base for a simple microcontroller!

Including 4-bit data entry. I did not work it out completely because I saw some projects on the net, way too much effort to design a small CPU.

 

But, at this point, I understood all the principles inside a simple microcontroller. Just deriving it artificially, not reading books about microcontrollers :manvery-happy: 

 

The only drawback is I don't use much schematics. Only when I put it on a real PCB, basically. 

0 Kudos