[comp.sys.m68k] Simple M68000 design wanted

jerry@qantel.UUCP (Jerry Gardner @ex2561) (03/10/89)

I am looking for a simple design for an M68000 system that I can adapt for
use as a home controller.  All I really need is RAM (preferably static), ROM,
and a few simple peripherals such as I/O ports and timers (an 68901 MFP would
be ideal).

Anyone know of any books on *simple* M68000 system hardware design or other
references?   I'm not trying to clone a SUN 3--I have a spare 68000 laying
around and just want something to turn my lights and sprinklers on and off.

rbrown@svax.cs.cornell.edu (Russell Brown) (03/10/89)

In article <520@qantel.UUCP> jerry@qantel.UUCP (Jerry Gardner) writes:

>I am looking for a simple design for an M68000 system that I can adapt for

There's a pretty good design for an M68000 single-board system in the book by
Wilcox (I can't remember the name of the book, but it's red and the front cover
is a schematic for an M68000 test circuit (basically, almost everything but
the clock is tied to ground)).  I don't have the book personally, so I can't
give minute details of the design, but I think it's pretty much the bread &
butter M68000 single board.

Russell G. Brown	Cornell Computer Science

ehs@jumbo.dec.com (Ed Satterthwaite) (03/11/89)

> In article <25975@cornell.UUCP>, rbrown@svax.cs.cornell.edu (Russell Brown)
> writes:
> In article <520@qantel.UUCP> jerry@qantel.UUCP (Jerry Gardner) writes:
> 
> >I am looking for a simple design for an M68000 system that I can adapt for
> 
> There's a pretty good design for an M68000 single-board system in the book by
> Wilcox (I can't remember the name of the book, but it's red ...

The title is "68000 Microcomputer Systems: Designing and Troubleshooting"
by Alan D. Wilcox.  It seemed pretty reasonable to me too.  The book is
organized around two similar projects: a simple SBC with EPROM, SRAM and
6850 ACIA, and a slightly more sophisticated processor board for an
S-100(!) system.

Another book of possible interest is "Microprocessor-based Design" by
Michael Slater, which I can also recommend as a general reference.  A
design example that's threaded through the book describes a 68008-based
controller with ROM, SRAM and 68901, as well as a simple keypad/display
user interface.

Either of these books will cost you more than a handful of 68000s.  An
alternative is to mix and match from some Motorola application notes, e.g.

AN867  A High Performance MC68000L12 System with No Wait States
AN896A Serial I/O, Timer and Interface Capabilities of the MC68901
         Multifunction Peripheral
         [illustrated by a simple 68008 system using DRAM]
AN897  MC68008 Minimum Configuration System [also DRAM]

Have you priced memory recently?  The bus and memory width you save going
from a 68000 to 68008 ought to pay for the processor chip.  Better yet,
have you thought about the 68HC11 or something similar?

Ed Satterthwaite
ehs@src.DEC.COM or {...}!decwrl!ehs  (ignore what our mailer says)

byron@pyr.gatech.EDU (Byron A Jeff) (03/12/89)

In article <13631@jumbo.dec.com> ehs@jumbo.dec.com (Ed Satterthwaite) writes:
-> In article <25975@cornell.UUCP>, rbrown@svax.cs.cornell.edu (Russell Brown)
-> writes:
-> In article <520@qantel.UUCP> jerry@qantel.UUCP (Jerry Gardner) writes:
-> 
-> >I am looking for a simple design for an M68000 system that I can adapt for
-> 
-> There's a pretty good design for an M68000 single-board system in the book by
-> Wilcox (I can't remember the name of the book, but it's red ...
-
-The title is "68000 Microcomputer Systems: Designing and Troubleshooting"
-by Alan D. Wilcox.
-
-Another book of possible interest is "Microprocessor-based Design" by
-Michael Slater, which I can also recommend as a general reference. 
-
-Either of these books will cost you more than a handful of 68000s.  An
-alternative is to mix and match from some Motorola application notes, e.g.
-
-AN867  A High Performance MC68000L12 System with No Wait States
-AN896A Serial I/O, Timer and Interface Capabilities of the MC68901
-         Multifunction Peripheral
-         [illustrated by a simple 68008 system using DRAM]
-AN897  MC68008 Minimum Configuration System [also DRAM]
-
-Have you priced memory recently?  The bus and memory width you save going
-from a 68000 to 68008 ought to pay for the processor chip.  Better yet,
-have you thought about the 68HC11 or something similar?

The impression I got from the original posting was that he alreay had
a 68008 and wanted to experiment. Not all toys need to be big and
go fast ;-) If he doesn't have a 68008 he should get one. Double busses
for a first project is not the best move. It does cost less than a 32K
static ram.

AN897 (of which I have a copy) is a bit too complicated for the beginning
user. When it was designed the only static ram that existed was 2K and
cost a bunch. With a 120ns 32K static at $15 apiece (quoted from a JDR
add in the Feb. Computer Shopper) memory for a test system won't
break you.

If one is seriously interested in building 68K stuff then the M68000KIT
for Motorla is the way to go. You get 3 processors (a 68008, 68000,
68010), a 68091 MFP, a 68681 Duart, a 68440 DMA controller, and a couple
or three other chips. Plus the latest copies of all the data book and
application notes. I got mine on a $68 special. I think they normally
run the mid $80 range.

If I just wanted to play around I would use the following:
68008 (I have one and 8-bits simplifies my design)
EPROM (2k or 8k)
RAM   (2k, 8k or 32K depending on how much code I wanted to run)
68681 (2 serial ports, timer, 6 bit input and 8 bit output port,
       built in baud rate generator, 68K async interface, runs
       off a 3.58 Mhz colorburst crystal)
TTL oscillator ( I generally don't like trying to build crystal
                oscillators. Jameco is having a sale on 18.4320
                parts at $1.95. Divide by 3 for system clock.)
Glue TTL ('138 for decoding, maybe a delay if my ram/eprom isn't fast
          enough. DTACK generation (for EPROM and RAM), DTACK Detection
          (for 68681))
MAX-232 (RS-232 drivers. Only requires 5V. If I had a +-12V supply I'd
         use a MC145406 RS-232 driver chip)

That's about $30-$50 in parts. The mounting hardware (breadboard, WW
or soldertail sockets) will cost about 1/2 that.

If I were doing anything more serious I'd use a 68010. The ability to
change the interrupt vector, to move data between different address
spaces and to have virtual memory support is worth the extra $20 bucks
to me.

I currently have a 10Mhz 68010 board with all the above components.
It has 16K of EPROM and 128K of RAM running at no wait states.
I use it as a Midi sequencer for my synth equipment. I'm in the 
process of putting together a 68008 board described above to test
a WD2797 FDC chip I have obtained. 

The application notes can be quite helpful for designing system
because they show various and sundry things like watchdog timers,
interrupt handlers, interfacing to 6800 components.

Another issue that hasn't been address is how are you going to
program the beast. Without software any SBC is just another useless
hunk of metal and silicon. My usual solution is to get a object code
loader (usually Motorla S-records) running on the board's EPROM
as quickly as possible and then develop software on another machine
that has a cross assembler/compiler. I have one written in C for the
68681 Duart running at 9600 BPS. All it does is load and execute code.

Fortunatly here at Tech I have access to Suns which I use to generate 
S-records from C code for my sequencer. Of course any number of public 
domain assemblers exist for the PC. A few can be found on the Motorla 
bulletin board (512-440-3733 8 bits no parity 300-1200-2400 bps). The best 
that I've found so far the a68k source on titan.rice.edu. It's a freely 
distributable C source version of the Dr. Dobbs assember that generates both 
S-records and Amiga object file format. If anything it does a little too 
much for you (like converting jumps to PC relative and zero filling S-records).
One of the labs here has been using it to program the 68008 boards the 
students build for thier class project. Both of the above "features" has 
been removed. The rice version is in uuencoded zoo format. Both uudecode and
zoo can be gotten from the comp.source.unix archives on uunet.uu.net.

I wish you luck in your endeavor. If there's anything I can do to help
just send mail to byron@pyr.gatech.edu.

A question for Ed: Where can I get small quantity of 68HC11s and at
what price? I'm thinking of doing a design for some control
applications. Thanks a bunch.

-
-Ed Satterthwaite
-ehs@src.DEC.COM or {...}!decwrl!ehs  (ignore what our mailer says)

BAJ
-- 
Another random extraction from the mental bit stream of...
Byron A. Jeff
Georgia Tech, Atlanta GA 30332
Internet:	byron@pyr.gatech.edu  uucp:	...!gatech!pyr!byron

ts@cup.portal.com (Tim W Smith) (03/23/89)

Back in school I took a lab course where everyone had to build a
project that used a micro in some way.  They normally wouldn't let
one build a general purpose system in this class, but because the
68k had only become available the year before, they would let one
do a 68k system.

My best friend and I took the class together and designed a system
similar to the one being discussed here.  We are *NOT* hardware
types.  We were both math majors who did a lot of software, but
had built almost nothing ( I did one of those Radio Shack P-BOX
projects once ( it even worked! ), but that's it. ).

Our theoretical knowledge was pretty much limited to the course we
took just before this lab, which covered things like basic logic
( AND, OR, etc ).  That course didn't really get past flip-flops
and shift registers.

We managed to get it to work.  If we could, *ANYBODY* can.  Here's
what we ended up with:

	6 MHz 68k
		The people who took the lab the year before were
		only able to get 4 Mhz parts.  Boy, were they
		jealous!

	2K SRAM

	8K EPROM

	2 65?? ( sorry, I forget what it was )
		These were serial ports.  We used them because
		they had an on-chip baud rate generator.  Some
		parts were free in this course, and other we
		had to purchase ourselves.  Baud rate generators
		were something like $10 in the EE stockroom!

	1 65?? ( again, I forget )
		Some random timer chip

The address decoding was just a couple of 74LS138's.  These picked off
the upper 6 bits of address to split the address space into 64 sections.
And AND ( or was it NOR? ) could then pick off a pair of outputs
from the 138's to generate chip select for a peripheral.

DTACK was pretty easy to handle.  When a bus cycle started, we started
shifting 1's into a shift register.  When the leading 1 got to the
appropriate place, we would generate DTACK.  For example, our RAM
needed three clock cycles.  So, when 1 one was in bit three, and
the chip select for the RAM was asserted, then DTACK would be
generated.  ROM needed 5 clocks, so that came from bit 5 of the
shift register.

When the cycle was ended, we cleared the shift register.

If the 1 got to bit 8 without DTACK being asserted, we generated
a bus error.

The only thing that caused trouble was generating the clock.  Crystals
were expensive ( and they were one of the parts that we had to buy
ourselves ).

We found some 24 Mhz ones at a surplus store.  We looked through the
data books, and decided to use a 74LS124 to generate the clock. ( I
think I remember that part number.  It's the one that claims to take
a crystal and make it vibrate ( allright, I admit it.  I am trying to
avoid attempting to spell "oscillator" ) ).

It didn't work.

We watched it on a 'scope.  It was going at 80Mhz.  This would not
do.  While experimenting with it, I once tried it without the Xtal.
It went at 84Mhz.  We were not pleased.

We called a TA over and asked what was wrong.  He said, "You're trying
to use a 124!? Ha Ha Ha Ha".  Soon all the other TAs were laughing at
us.  Apparently, it was well known among the hardware types that 124's
do not work.

We ended up buying one of those cute little metal things that has all
of this stuff in one package.

Oh, there was one other glitch.  My serial ports would not run above
4800 bps.  My friends would not go above 1200.  We were mystified.
We finally looked at the signal comming in on the 'scope.  At 9600,
the signal comming into the line buffer was correct.  The signal
going out was not.  The line buffers had a pair of pins that you
are supposed to hook a capacitor to.  This is used to filter out
high frequency line noise.

We went to the EE stockroom and asked the clerk for capacitors.  He
had given us the wrong ones.  We asked for XXX picofarads, and he
gave us XXX microfarads!  The line buffer was filtering out 9600 bps
as noise!  For instance, if the incomming chatacter was something like
01011001, it would come out 01111001!

Anyway, my rather long winded point here is that if you just want a
simple system with some 8 bit peripherals, and nothing fancy like DMA,
it's easy to build.  Even if you can't find the books that have been
mentioned, go ahead and give it a shot.

						Tim Smith