Maker Pro
Maker Pro

Adding Serial I/O on a vintage Z80 system

C

Commander Dave

Jan 1, 1970
0
Greetings,

I am wanting to add a serial port to a vintage 1980 Z80 computer system. Due
to the construction, I am very limited on what I can do physically with it
(card cage, close fit, etc...).

To make things simple, I was thinking of making a cable that plugs into the
Z80 itself and runs to a small daughter board. I have found schematics for
the circuit using an 8251 and it looks easy enough to implement, but I can't
figure out how to make the baud rate clock(s). I haven't got to that section
on my electronics studies yet. ;-)

My requirements are very modest... 9600 would be nice, but even if I could
get 2400 out of it that would be fine (no high speed needed - just running a
terminal for a debugger).

I guess my questions are:

1. Is there already such a device out there for sale (on the new or surplus
market)? I would really just like to pick up something cheap to do the job
if possible. If nothing is available at a reasonable cost, then...

2. What information do I need about the computer to design the baud rate
clock circuit? I don't know what is needed for the circuit.

3. Given that information, is there a simple design out there for the clock
circuit that someone could share?

Cheers,
-Commander Dave
 
L

Lord Garth

Jan 1, 1970
0
Commander Dave said:
Greetings,

I am wanting to add a serial port to a vintage 1980 Z80 computer system. Due
to the construction, I am very limited on what I can do physically with it
(card cage, close fit, etc...).

To make things simple, I was thinking of making a cable that plugs into the
Z80 itself and runs to a small daughter board. I have found schematics for
the circuit using an 8251 and it looks easy enough to implement, but I can't
figure out how to make the baud rate clock(s). I haven't got to that section
on my electronics studies yet. ;-)

My requirements are very modest... 9600 would be nice, but even if I could
get 2400 out of it that would be fine (no high speed needed - just running a
terminal for a debugger).

I guess my questions are:

1. Is there already such a device out there for sale (on the new or surplus
market)? I would really just like to pick up something cheap to do the job
if possible. If nothing is available at a reasonable cost, then...

2. What information do I need about the computer to design the baud rate
clock circuit? I don't know what is needed for the circuit.

3. Given that information, is there a simple design out there for the clock
circuit that someone could share?

Cheers,
-Commander Dave

What is the system Dave? Is it an S-100 based stem such as an Altair or
perhaps a Northstar Horizon? In any case, I would use a Z-80 DART...
Dual Async Receiver Transmitter.

A baud rate clock is usually simply the desired baud times 16 so 9600
would be a 153,600Hz pulse source. Use a crystal of frequency 4.9152
MHz and divide it down to all your standard baud rates. BTW there used to
be baud rate generator chips that did this.
 
C

Commander Dave

Jan 1, 1970
0
Well, honestly, it is "technically" a computer. In reality, it is an old
1980 coin operated video game called Wizard of Wor by Midway (same hardware
as the game Gorf). Now you can see why my options are limited... :)

For the curious of why in the world would I want add a serial port to an
ancient video game, it's just a hobby I guess. I like to collect and work on
old video games (see rec.games.video.arcade.collecting) and one of the "just
for fun" things I do is to write code for this old game (memory tests,
speech changes, etc). While using an emulator to write the code is great,
the emulator (MAME) doesn't follow the EXACT hardware, so sometimes what
works on the emulator will not work on the real hardware. Some examples
would be the watchdog timer and a "memory protection" circuit in the static
RAM area.

So, instead of burning countless EPROM's and guessing what is going on when
my code fails, I am going to hook a terminal up to it (via serial port
hopefully) and install a debugger. Since there are several unused EPROM
sockets, it would be easy to do while keeping the original code in place.

Now, back to the serial port details...

Your hardware explanation sounds on target, but remember that I am still
green when it comes to some electronics. I am taking courses, but haven't
got to "clocks" and crystals yet except for a basic understanding. What I am
looking for is a simple schematic with parts to do this part of the circuit.
I could, with time, figure it out, but really need this debugger working
soon to finish one of my "projects". :)

The use of the old baud rate chips is fine. In fact, the reason I was using
an old 8251 is because the debugger already has the I/O routines for it in
there. Newer chips/circuits are fine if they are available and would
simplify things (complete serial port on a chip anyone?).

Thanks for the help... all is appreciated!

Cheers,
-Commander Dave
 
R

Rich Grise

Jan 1, 1970
0
Bit-bang it! With a 4 MHz Z80, you have approx. 400 clock
cycles to execute instructions during one bit of a 9600
BPS serial signal. You should have some kind of timer or
access to an interrupt, to give you a sampling interval,
so you won't hog the whole processor just bitbanging.
I used to fix video games. They're cool! I also built up
an awesome junk box when Mr.Do! came out and people threw
away their old board when they converted. I had piles of
Z-80s, 6809's, 6502's, static & dynamic RAM, EPROMs, sound
chips, some peripherals, and piles of random jellybean logic.
I thought Q-Bert was cool because it used an 8088, but I
never did get my hands on one to cannibalize. :)

Ah, those were the days!

Cheers!
Rich
 
C

Commander Dave

Jan 1, 1970
0
Ah, I read about the "bit bang" method! You know, I remember back when I was
a teenager programming the 8251 and such, but the bit bang method was just a
little before my time. Never needed to do it in those days. It would take me
more research than I am willing to do for now. Looking for that "instant
gratification" thing, you know. My ideal would to just buy the little
circuit board that plugs into the Z80 socket and gives me an instant serial
port. Didn't these once exist back in the "old days" of computers? Think I
could find one on Ebay? ;-)

Oh, just for the record, I believe that this machine uses something like a
1.7 MHz clock. It's amazing they did the things they did with such clock
speeds. One of the more interesting aspects of this hardware is that they
have a whole card called the "Pattern Transfer Board" which, from what I
gather, is just DMA. It did have some special features built in such as
scaling and rotation. The board is totally TTL and I still looking at how to
write some test software for it, but the hardware is still a little beyond
me at the moment. :p

Oh, got any of that old video game junk lying around you want to give to a
good home? <grins>

Cheers!
-Commander Dave
 
M

Michael A. Terrell

Jan 1, 1970
0
Commander said:
Well, honestly, it is "technically" a computer. In reality, it is an old
1980 coin operated video game called Wizard of Wor by Midway (same hardware
as the game Gorf). Now you can see why my options are limited... :)

For the curious of why in the world would I want add a serial port to an
ancient video game, it's just a hobby I guess. I like to collect and work on
old video games (see rec.games.video.arcade.collecting) and one of the "just
for fun" things I do is to write code for this old game (memory tests,
speech changes, etc). While using an emulator to write the code is great,
the emulator (MAME) doesn't follow the EXACT hardware, so sometimes what
works on the emulator will not work on the real hardware. Some examples
would be the watchdog timer and a "memory protection" circuit in the static
RAM area.

So, instead of burning countless EPROM's and guessing what is going on when
my code fails, I am going to hook a terminal up to it (via serial port
hopefully) and install a debugger. Since there are several unused EPROM
sockets, it would be easy to do while keeping the original code in place.

Now, back to the serial port details...

Your hardware explanation sounds on target, but remember that I am still
green when it comes to some electronics. I am taking courses, but haven't
got to "clocks" and crystals yet except for a basic understanding. What I am
looking for is a simple schematic with parts to do this part of the circuit.
I could, with time, figure it out, but really need this debugger working
soon to finish one of my "projects". :)

The use of the old baud rate chips is fine. In fact, the reason I was using
an old 8251 is because the debugger already has the I/O routines for it in
there. Newer chips/circuits are fine if they are available and would
simplify things (complete serial port on a chip anyone?).

Thanks for the help... all is appreciated!

Cheers,
-Commander Dave

YOu should look at building an "EPROM Emulator". Byte magazine had an
article in the April 1986 issue, page 105, for one that emulates the
2716, the 2732, or the 2764 EPROM.

It uses:
1 6402 UART
1 6264 SRAM
1 4013
1 4520
1 74LS02
1 74LS175
5 74LS244 Octal latches
1 1.8432 MHz crystal
and a few misc. resistors and caps.


I still have a photocopy of part of the article, but my copy of the
magazine is either in storage, or missing.

Another method is to use NVRAM to hold your code. ZMD makes several
sizes that replace standard SRAM, but retain data by writing to an
internal EEPROM at power down, and by reading it back into SRAM at power
up. I have programmed NVRAM in an EPROM programmer to save setup time
on new radios, or to remove out of range data from new, blank battery
backed SRAM. Units that had been factory tested were not erased, and
would cause the embedded controller to lock up, unless they were wiped
clean, or pre programmed.

--
10 days!


Michael A. Terrell
Central Florida
 
Top