Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!sun!imagen!atari!portal!cup.portal.com!ts From: ts@cup.portal.com (Tim W Smith) Newsgroups: comp.sys.m68k Subject: Re: Simple M68000 design wanted Message-ID: <16145@cup.portal.com> Date: 23 Mar 89 11:58:43 GMT References: <520@qantel.UUCP> <25975@cornell.UUCP> <13631@jumbo.dec.com> <7533@pyr.gatech.EDU> Distribution: na Organization: The Portal System (TM) Lines: 101 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