Close

How it works

A project log for 68020 minimal homebrew computer

Easy-to-build 68020 single-board computer - utilizing conventional components only and designed for simplicity and ease of understanding

stevenSteven 12/28/2023 at 13:050 Comments

Introduction
In this log, I'll explain in detail how this single-board computer works.

8 bits bus only

The 68020/68030 have dynamic buses; this means that they are not fixed to 32 bits. A 68020 board can have 32 bits RAM, 16 bits ROM, and 8 bits IO. Of course, this flexible bus is great, but it also makes things complicated. The CPU asks for one, two, three(!), or four bytes, and the board responds with what it can deliver. The lines SIZE0 and SIZE1 determine what the CPU is asking for. The lines /DSACK0 and /DSACK1 determine what the board can deliver. It is clear that a lot of logic (PAL) is needed to decode that.

Since my design needs to be as simple as possible, only a (fixed) 8-bit bus is needed. Therefore, SIZE0 and SIZE1 are not needed, and only /DSACK0 needs to be asserted (to zero). Since this also determines the wait states, this signal is coming from the wait state generator. /DSACK1 is always high.

Optional power supply
There is room for an optional power supply, using the good old 7805. It is capable of 1.5A, more than enough. It also has a 500 mA polyfuse to prevent damage during the device's construction. Perhaps it's better to use a 250 mA while testing. The diode (D3) prevents damage if the power is accidentally reversed. 

Via a header/switch, it is possible to draw power from the USB serial interface or using the power supply. If you are using USB power, it is better to add the 470uF capacitor (C13). While using the LM7805 regulator, this is not necessary.


Clock, reset and halt-circuit

Address decoder
The 74HCT139 is my favourite chip: for decoding ROM, RAM, IDE and UART, only half of the IC is needed. A0/A1 (pin 2/3)  from the decoder are connected to the address lines A19/A20 of the CPU, and the /Enable (pin 1) is connected to the /AS (address select). That's all to generate the active low chip select lines for ROM, RAM, IDE and UART:

/READ and /WRITE
The other half of the 74HCT139 is used for generating the /RD and /WR signals. These signals can also be generated with a simple inverter, but they are only active if /DS (pin 24) is asserted. Since there are no inverters left, this is a nice solution.

RAM and EEPROM
Now we have generated the base signals, connecting RAM and ROM is straightforward. The data lines D0-D7 from the RAM/EEPROM are connected to the datelines D24-D31 of the CPU. This needs some explanation: this design uses an 8-bit data bus. Since the 68000 family is big endian, the highest data lines from the CPU are used. D0-D23 are not connected.

UART (CPU side)
The connections to the 16550 UART to the CPU are as straightforward as the RAM. Some extra signals:

UART - IO
The 16550 UART has beside the serial in (SIN) and serial out (SOUT) four input and four output lines. These pins are used for software generated SPI and I2C. In a previous design (68000 minimal homebrew computer) I used a 6522 VIA, which has programmable input/output lines, ideal for I2C; the data line SDA is both input and output.

The 16550 has only fixed input and output lines, so I had to combine these with resistors to create the data line for I2C. Also the lines from SPI and I2C are combined. Take care in the software not to send data to both peripherals. I haven't tested this yet!!!

SPI (SD-card)

I2C (for RTC PCF8563)

100 HZ oscillator

Signal LED

USB serial

IDE/SD-card adapter

I found this IDE/SD-card adapter on the internet for less than €10. It is a 44-pin IDE-compatible card using an SD card. Because it is IDE-compatible, it is easy to use and could be ideal for home-brew computers. It should also be compatible with the 8-bit bus, but I have no idea if this is going to work in my design.


So this is the connector for it. (It cannot be used for CF cards because these cards use 16-bit data transfer, and in this design, there is only an 8-bit data bus.)

Wait-state generator

For higher clock speed, it is desirable to add wait states for the RAM/ROM and IO. It is surprisingly simple to generate these with a 74HC164 shift register.

Unfortunately I made a minor mistake; Q0 is zero wait state while I expected one. So the description on the PCB is wrong.

Discussions