Tuesday, January 3, 2017

Building a 68000 Single Board Computer - It's Alive!

I spent some of my recent holidays wiring up the rest of the board. With about 30 chips and a similar number of discrete components, it was quite time consuming. I followed a wiring color coding convention to distinguish between power, ground, data, address, and control signals.

To minimize the chance of errors I also marked the schematic in red pen for every connection that was made, and "ohmed out" the connections using a multimeter. As work progressed I only made and noticed a few wiring errors. I noticed a couple of small errors in my schematic as well during this process.

Last night I completed the wiring except for some portions that were not yet needed - the second set of EPROMs and RAM chips (not used by the monitor software) and the second serial port.

Today I did a last check that all chips were correctly installed and then powered it up. There were a few good signs immediately: no smoke, no chips got hot, and the current drain was reasonable. The halt LED did not come on, and looking at the CPU signals indicated that it seemed to be executing instructions.

However, no data came out the serial port, which should be expected if the monitor program was running. Some investigation with an oscilloscope indicated that the UART was never being enabled, so I started tracing back the address decoding chain.

I studied the relevant circuitry and looked at the description in the Clements book. Only a few minutes of study led me to realize that there was an error in the textbook and accompanying schematic. The wrong output for decoding the UART address was being used. This was confirmed by seeing that what I believed was the correct output was being enabled.

I made a quick change of one wire wrap, and tried the system again, hooked up using an FTDI USB to serial adaptor to a terminal emulator on my laptop. Sure enough, now I was seeing the monitor prompt!

I was able to type monitor commands and they worked correctly. I did some simple checks of the EPROM and RAM, and they appear to be working correctly. The single step circuit also seems to be working.

I'm amazed that it basically worked the first time. A lot of things had to all come together - the circuit design had to be correct, it needed to be correctly wired, and all components needed to be working.

I updated the schematic on github to correct the error, and better documented the monitor commands .

The next steps are to wire up the second UART and second set of RAM and ROM chips.

After that I can experiment with some more software. I've already entered a small program and confirmed that I can run it from the monitor, including hitting a breakpoint.

In taking some pictures of the board I noticed that it has something in common with some versions of the Raspberry Pi - it is sensitive to the camera flash, and will reset if a flash picture is taken close to it. The culprits are the EPROM chips.

1 comment:

jonno said...