🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.electronics
Article #808

Re: Z80-SIO chip programming

#808
From: William Swan
Date: Fri, 14 Jul 1989 17:59
47 lines
2364 bytes
In article <6914@kean.mun.ca> andrew@kean.mun.ca writes:
>trusty Kaypro 10, I now find myself in a slight problem when it comes to the 
>darn Z80-SIO chip.
>After a _lot_ of work, I finally managed to track down a sketchy outline of 
>the chip's software structure.
>
>Can _anyone_ please tell me how to set the darn thing to 8 bits, no parity, 1 
>stop, and no handshaking (if possible)?
>
>Thanks in advance.  >-Andrew.  >Bitnet: andrew@kean.mun.ca


Call Zilog (408-370-8000, 210 Hacienda Ave. Campbell CA 95008-6609) for a
copy of their 1989 (yes, that's 1989) Z80 Family Data Book, which describes
the Z80-SIO.  They once had a Z80-SIO technical manual, which I recommend
highly if you can get one from them.


From what I remember of the SIO from 6-7 years back, it's not that
difficult to set up what you want. The trick is that a write to each Write
Register requires two writes: a write to WR0 which contains in its 3 LSBs
the address of the register you want to write to.

For example, to write to reg 5 you'd write out the two following bytes:
	00000101	(or xxxxx101)
	xxxxxxxx	(data for reg 5)

For what you want, the following bits are relevant (no, I can't tell you
how to select between channel A and B on the Kaypro - it's probably a
different port address):
	WR3	11xxxxx1	Rx 8 bits, enables Rx
	WR4	xxxx01x0	Rx 1 stop, no parity
	WR5	x1101xxx	Tx 8 bits, no break, enables Tx

Possibly what you're asking for is this (I believe this does no handshaking):
	WR0	00000xxx	(better check initialisation on this reg)
	WR1	xxxxxxxx	(better see how kaypro uses these)
	WR3	11000011
	WR4	ccxx01x0	cc - set for clock rate
	WR5	x1101xx0


-- 
Bill Swan  entropy.ms.washington.edu!sigma!bill  Send postal address for info:
	Innocent but in prison in Washington State for 13.5 years:
	Ms. Debbie Runyan: incarcerated 01/1989, scheduled release 07/2002.
	                   In now:  0 years,  5 months,  3 weeks,  3 days.
Technical Details
Message-ID: <2497@sigma.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!cs.utexas.edu!uunet!pilchuck!amc-gw!sigma!bill
References: <6914@kean.mun.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!cs.utexas.edu!uunet!pilchuck!amc-gw!sigma!bill
From: bill@sigma.UUCP (William Swan)
Newsgroups: sci.electronics
Subject: Re: Z80-SIO chip programming
Message-ID: <2497@sigma.UUCP>
Date: 14 Jul 89 17:59:13 GMT
References: <6914@kean.mun.ca>
Reply-To: bill@sigma.UUCP (William Swan)
Distribution: usa
Lines: 47