. | . | . | . | David McCracken |
uCISE/MDT20updated:2016.07.13 |
Before Zilog invented the Z8 there were only two 8-bit single-chip microcontrollers, Fairchild’s 3870 and Intel’s 8048. Both of these had crude and inflexible I/O. In contrast, the Z8 afforded extraordinary I/O flexibility, allowing both the electrical and functional characteristics of every pin, individually and in combination with others, to be configured and reconfigured on the fly. In-circuit emulators for the 3870 and 8048 were relatively easy to make because their inflexible I/O was easy to recreate with external circuitry. Zilog had made an ICE for the Z8 but the customers hated it. While it could emulate most I/O configurations (with a huge amount of hardware) it could not reconfigure the I/O on the fly, precluding some of the most interesting design possibilities, as my “Computer Design” article Popular Micro Configured For Direct DRAM Support illustrates. Further, its $100K cost was five times what people were used to paying for an ICE.
Besides the ICE, the Z8 suffered a development problem that afflicted all early microcontrollers except the 8048. Only Intel was able to produce one with on-chip EPROM. For production volumes, this was not a problem, as the devices were produced with mask-programmed ROM. But something else was needed for prototyping and pre-production. Several manufacturers, including Zilog and its Z8 second-source Synertek, produced a piggyback device, which contained a Z8 CPU wired to an EPROM socket on top of the package. This was intended for pre-production. The socket could not survive the repeated insertion cycles required by “burn and crash” program development even if engineers were willing to do that (by this time most engineers expected to have an emulator).
Zilog did not intend the piggyback to be used for development. However, I realized that my Hybrid Tool For Universal Microprocessor Development could at least improve the development situation by emulating the EPROM, thereby enabling a permanent cable connection to the socket and infinite and nearly instantaneous program changes.
Just emulating the piggybacked EPROM would have made a valuable tool, costing far less than Zilog’s emulator while accurately and completely emulating all I/O configurations. However, the development system could not read target data through this connection, as the Z8 could not write to the socket. It fact, its Harvard architecture precluded writing to program memory even in theory. I invented a means of circumventing this limitation, enabling the development system to extract data from the microcontroller and, through it, from the entire system under development.
I reasoned that if the CPU could only read from its program then the only means that it would have of transmitting data would be by its reading pattern, that is “where it reads is what it writes”. Although this concept requires a head-jarring conceptual leap, it requires only modest hardware and software to work. The CPU could read any program address without incident when running the program under development but when a breakpoint switched the program it also enabled address monitors to record the CPU’s accesses to two specific addresses, one indicating a 0 and the other a 1. The diagnostic program caused the CPU to test every bit in all of its memory, branching to one or the other bit record addresses depending on the bit value.
Combining my earlier memory emulation and the Harvard reversal invention with a piggyback microcontroller not only produced superior emulation but also drastically reduced the hardware cost of a full-fledged emulator. Soon after applying this to the Z8 I did it with several microcontrollers from other manufacturers.
After my article In-Situ Emulation Paces New Micros, which describes the advantages of this approach, was published, all of the affected microcontroller companies were interested in my work, but only Synertek showed a serious interest in distributing a development system. They were depending on Zilog’s Z8 emulator and were very unhappy with it.
Synertek had a very savvy microcontroller marketing department. They thought my invention was wonderful but could not stand alone; that I needed to develop a turn-key system, even if the other features were not as creative as my basic invention. I wrote a Z8 assembler, program loader, debugger, and a number of utilities in BASIC and Z8 and Z80 ASM. Meanwhile, Synertek’s marketing department was canvassing customers and potential customers promoting my emulator. When I was done, they already had enough orders to start production.