9

I recently got the idea to start an 8088 system because I've been really interested in retro computing and the idea of a "breadboard computer" sounds very fun.

From what I've read, every homebrew 8088 system requires the use of the 8284 clock generator chip in order to function. Because the 8088 just has a single clock input pin, would I be able to hook up a different method of clock generation? A 4-pin crystal, or 555 timer maybe? I am asking because i have tried looking for the 8284 and I cannot get it here in Australia.

Thanks.

  • 1
    You can get the 8284 and just about anything else on the big auction site, but that doesn't answer your question as stated. I'm interested in reading a real answer to your question. – snips-n-snails Feb 1 '18 at 5:38
13

Caveat: I can't confirm that this works acceptably, as I haven't been able to find any references to anyone who has done it, but by reading the datasheet of the 80C88 it seems it should work there, and it may also work on an original HMOS 8088, but that's less certain as the HMOS design wasn't static (although it could work at relatively slow clock speeds, e.g. 2MHz).

The primary purpose of the 8284 is to provide a clock with 33%/67% duty cycle. The reason for this, per the 8088 datasheet, is "to provide optimized internal timing". That is to say, the chip can run faster because it has an asymmetric duty cycle.

But there is nothing to say that you need the chip to run as fast as it possibly can; if you are happy to run it at a slower rate, there is nothing in the datasheet's timing requirements that suggests that it can't be run with a 50% duty cycle. Just that you have to run it slower in order to do so.

The 8088 (and the modern replacement 80C88) is available in two speed grades: 80[C]88 (max clock speed 5MHz) and 80[C]88-2 (max clock speed 8MHz).

For the 5MHz variant, the requirements for the CLK pin timings are specified as:

Description             Min   Max  Unit
CLK Cycle period        200   500  ns
CLK Low Time            118        ns
CLK High Time           69         ns
CLK Rise Time                 10   ns
CLK Fall Time                 10   ns

Assuming your clock source has the maximum 10ns rise & fall times, this means that you can meet the requirements with a 50% duty cycle of 118ns. This gives a total clock rate of 1s/(118*2 + 10*2)ns = ~3.9MHz. If you can manage a faster 7ns rise & fall (which should be reasonably easy), that increases to 4MHz, which is easy to produce with readily available crystal oscillators.

For the 8MHz variety, the timings are:

Description             Min   Max  Unit
CLK Cycle period        125   500  ns
CLK Low Time            68         ns
CLK High Time           44         ns
CLK Rise Time                 10   ns
CLK Fall Time                 10   ns

Again assuming you can manage a 7ns rise/fall time (because it works out neater in this case too), this allows a maximum 6.67MHz (or 6.41MHz with 10ns).

If you can live with this speed for whichever chip you acquire, I see nothing in the datasheet that suggests that using it this way wouldn't work. Then all you need to do is replace the power-on reset functionality with an alternative circuit that meets the 8088's requirements (it needs the RESET line held high for at least 4 cycles at power on in order to initialize correctly) ... a common approach in lower cost computers of the 80s was to use a 555 chip in its monostable configuration (as described in its datasheet) for this purpose.

This suggests that it is relatively easy to do without an 8284. The question is: should you?

  • If you really want maximum performance, getting one would probably be the easiest way of achieving that. The next best approach would be to use a faster clock (e.g. 15MHz), and either divide it with a counter (counting 0..2 before resetting, with a nor gate to produce a high level signal only when in state 0, for example -- although if you need a 50% duty cycle clock as well, you'll need to run at 30MHz and count to 6, and the logic gets a bit more complex), or run it through a shift register to produce the required output, but that's probably a little bit trickier.

  • If you are willing to deal with chinese vendors, I see 82C84 chips available on aliexpress.com at sub-$1 prices plus relatively cheap postage. These can be used with either the CMOS or HMOS versions of the processor; they are functionally identical as far as I can see.

  • If you can live with slow performance, and you'd rather deal with local vendors, 82C84s seem to be hard to acquire. None of the vendors I use regularly stock them, so you're looking at the very least a long wait while they order them in, and you may be looking at a fairly large minimum order. They're also not anywhere near as cheap as the chinese vendors: I see prices of at least $5 here. In this situation, I'd suggest doing without one, and making a reset circuit from a 555, which should be easy to acquire locally and cost a lot less than $5. :)

But there is another way...

As pointed out by @ChrisStratton in comments to @lvd's answer, you can easily use a modern microcontroller to produce the required signals. Obviously this isn't for everyone: in many cases the purpose of projects like this is to find novel ways of using the technology that was available at a particular point in time, which would rule out this approach, but if that's not why you're doing this, then this approach could be the best way of solving this particular problem.

See the comments there for my research on how I came to this design, but it seems if you want to do this, a good way of doing it would be to use a PIC12F1571 chip. This chip is cheap (in the UK, £0.59 in unit quantities, or £0.49 in quantities of 10) and readily available. It can run up to 32MHz, which is fast enough to generate precise clocks for a 5MHz 8088 along with a 50% duty cycle clock for peripherals, or just a CPU clock for running an 8088-2 at very close to its maximum 8MHz frequency.

For 5MHz usage, you'd use it with an external 30MHz crystal, and set up two of its PWM outputs to produce a 2-cycle high, 4-cycle low output (for the CPU clock) and a 3-cycle high, 3-cycle low output (for the peripheral clock).

This uses up 5 of the chip's 8 pins (VCC, GND, and CLK inputs; CCLK and PCLK outputs). There are 3 more available; you can use 2 of them for a reset switch input and RESET signal output and have then entirely duplicated the functionality of the 8284.

For the 8088-2, most things you read would suggest running it at 24MHz with a 1:2 cycle setting on the PWM to produce the CPU clock. Unfortunately this gives results that are slightly out-of-spec -- the clock high phase would be 42ns long, but the datasheet requires 44ns. Now, this would almost certainly work correctly, but to keep within spec you could use a 22.5792MHz crystal to provide an external clock to the MCU. The same 1:2 setting on the PWM would now produce a 44ns/89ns cycle, which is in spec and lets you run the CPU at 7.5264MHz.

(22.5792MHz crystals are apparently quite common: they're 512 * 44100 cycles per second, which makes them useful for running the processors in CD players)

If you really want performance, then you'll need a faster microcontroller still. We're starting to push the limits of what's available without using surface-mount chips, but the PIC18F24K42 is available. It's a DIP-28 chip, so quite large, but maybe you can find other uses for the other pins (turbo switch and output to a 7-segment LED display to show the actual speed, perhaps?). It can run at up to 64MHz; at that speed a 3:5 ratio on the PWM gives a 47ns/78ns clock which gives the maximum 8MHz and is within the CPU's specs, and obviously 4:4 ratio can be used for a peripheral clock. You'd also have plenty of spare PWMs (this chip has 10 of them) which could be used for other useful clocks: a 3-phase 21.333MHz clock could be very handy for implementing a DRAM controller, for example.

  • (As an aside, I'd really like to hear comments from anyone who's done this, as I have plans at some point in my future for a custom 8086 build, and this calculation should apply there, also... but as I don't expect to get there for a while yet, I guess I can wait: I've still got to build my ultimate Z80 machine, which I haven't even finished doing the research for yet.) – Jules Feb 8 '18 at 17:09
8

Of course, you don't need 8284 to let your 8088 run.

First let see what tasks 8284 does, according to its datasheet http://www.ndr-nkc.de/download/datenbl/i8284a.pdf:

  1. It makes clock for 8088 of special shape like 1-0-0-1-0-0-... where the repeating frequency matches the specified 8088 frequency (2 to 5 MHz, according to this http://www.ndr-nkc.de/download/datenbl/i8088.pdf). The durations of each '0' or '1' interval are the same. 8284 does it by dividing input clock by 3. The fact also worth mentioning is that clock levels (logic 0 and logic 1) for 8088 are simple TTL ones, unlike, for example, i8080 and Z80.

  2. It synchronizes reset for 8088 by its clock's negative edge.

  3. It does also some magic with 'READY' signals, but if you don't ever need stretching 8088 bus cycles, you can simply drop this feature off and let 8088 have a constant on its 'READY' pin (the bus is always ready).

From this little review it is now obvious that nothing will stop you from getting 8088 work without 8284 - provided you does exactly what 8284 would do.

  • 1
    It is also worth mentioning that while i8080 seemingly needed its clock companion chip 8224 even more urgently than i8088 would need 8284, there were lots of designs that worked fine without it and without 8080's bus controllers (8228, 8238). One example is this: spetsialist-mx.ru/schemes/Spetsialist.png – lvd Feb 1 '18 at 15:03
  • 2
    These days you can probably with cleverness accomplish that with an MCU's hardware timers, or a tiny CPLD, or assorted selections from several decades worth of clock and timing chips. – Chris Stratton Feb 4 '18 at 9:01
  • 1
    @ChrisStratton - true. An Atmel ATTINY25 can run up to 20MHz, for example, and can produce 2 cycle-exact PWM outputs without even needing to run any code (other than setup, of course), and costs substantially less than even a Chinese-sourced 82C84. You could easily produce the required clock for a 5MHz 8088 by running one at 15MHz with a 1-cycle high, 2-cycles low setting -- assuming you can do without the 50% duty cycle peripheral clock, anyway. For that, or an 8MHz chip, you'd need something a bit faster, but that'd not cost a lot more. – Jules Feb 8 '18 at 17:38
  • Although some would, of course, say that using a modern component where a period-appropriate one was still available kind-of defeats the purpose. I.e., when I do the Z80 machine I mentioned above, I'm fully intending to do as much as I can in 74-series chips, even though there are readily-available CPLDs and similar that could massively simplify my job. Because I want to see what I would have done back then, if I had had the understanding that I do now, but with nothing else changed... – Jules Feb 8 '18 at 17:42
  • 1
    ... expanding on my AVR comment above: I'm less familiar with PIC chips, but it seems that a PIC12F1571 (which is even cheaper than the ATTINY25) can go up to 32MHz. At 30MHz, it can produce both CPU and peripheral clocks for a 5MHz chip. For the 8MHz chip, it turns out that the required timings are actually slightly different to the 33%/67% duty cycle implied by the data sheet, so can't be achieved with a 24Mhz MCU (it could produce a 42ns/83ns clock, but the high needs to be 44ns to be strictly in spec). At the common 22.5792MHz frequency it would be in spec, and achieve a 7.5264MHz clock. – Jules Feb 8 '18 at 18:53
6

The short answer is you should use a 8284 chip.

The long answer is the functions could be duplicated by extensive external circuitry, but why would you want to? The 8284 function is described thus:

"The 8284 contains a clock generator capable of a third the frequency of the input clock (up to 8MHz with the 8284A), with sources selectable between an external crystal and clock input. The main clock output consists of a 4.5V (Vcc @ 5V) square wave at a 33.3% duty cycle, with an additional peripheral clock running at half of the main clock and a 50% duty cycle. Additional logic is provided to accommodate delays to allow for proper system start-up."

Forgetting for a moment the reset circuitry, the 8284 provides two synced noise-free clocks with proper voltage and wave shape - this is not a trivial matter to accomplish.

Every minimal circuit I found (over 50) and YouTube basic design projects has one - especially the breadboard designs. Breadboard designs are known for their simplicity and if the chip was not needed, at least some of the breadboard designs would not have it.

Informative links:

  • Thanks for your answer. Would you happen to know where i could get that chip in australia? – DylanG Feb 1 '18 at 8:26
  • I did an exhaustive search and could not find a new parts supplier, or even an international supplier like AliExpress or Futurlec that carries it. Ebay has them for about $5+$2shipping (US). If I was going to try to get one fast, I would go to a used store and de-solder it from an old computer gathering dust - but the price would probably be higher. – jwzumwalt Feb 1 '18 at 8:37
  • I could desolder from an old part but what’s the likelihood of them even carrying boards that have the chip on it? – DylanG Feb 1 '18 at 8:39
  • All old XT computers will have it. – jwzumwalt Feb 1 '18 at 8:43
  • 1
    First of all I won't accept the argument that breadboarders tend to do everything in a minimum chip count possible to save labor. It is already a great labor of soldering such a breadboard and they are just having fun doing that. – lvd Feb 1 '18 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.