ZX81 software serial port (was Re: ZX81 I/O ports)

From: Richard Erlacher <edick_at_idcomm.com>
Date: Sun Mar 24 08:54:39 2002

You should have no trouble finding one or more of the thousands of examples of
bit-banging a serial interface that have been published over the years. A
GOOGLE search for "software UART" produces lots of hits.

It's not rocket science. Keep in mind that with asynchronous communications,
you need to remain within one bit-time over the course of, at most, 11 bits,
of which the first and last are start and stop bits, respectively. If you
stick with 7-bit ascii, you have more margin. Each time you start, you start
anew, so there's no cumulative timing error over more than one character. If
you don't mind the code size, you can time this VERY well regardless of the
main oscillator frequency, since you can make minor adjustments between bits.
It's normal, BTW, to sample at the middle of a bit window. (someone had to
point that out to me once ... but only once ... )

The Z80 computes parity in the PSW, though there's some sort of gotcha with
that, if my feeble memory serves.

good lluck.

Dick

----- Original Message -----
From: "Stan Barr" <stanb_at_dial.pipex.com>
To: <classiccmp_at_classiccmp.org>
Sent: Sunday, March 24, 2002 2:43 AM
Subject: Re: ZX81 software serial port (was Re: ZX81 I/O ports)


> Hi,
>
> "Glen Goodwin" <acme_ent_at_bellsouth.net> said:
> > > From: Stan Barr <stanb_at_dial.pipex.com>
> >
> > > Hmm...I did my ZX81 serial port in software! It was only used to
> > > transfer data to the host computer, so it was pretty simple...
> >
> > Stan, I would really appreciate it if you would share this solution with
> > me, assuming you still have the code.
> >
>
> Sorry, I can't find *any* of my ZX-81 software ;-( There's a folder
> somewhere with all my notes and listings in, but where?? (I've got
> way too much junk!)
>
> It drove an 8255 port using a mixture of Forth and assembler code I
> filched from a book. Only ran at about 110 bps, but it was enough
> for what I was doing.
>
> These days, I'd probably just hitch up a standard UART...
>
> --
> Cheers,
> Stan Barr stanb_at_dial.pipex.com
>
> The future was never like this!
>
>
>
Received on Sun Mar 24 2002 - 08:54:39 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:13 BST