Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!iscuva!jimc From: jimc@iscuva.ISCS.COM (Jim Cathey) Newsgroups: sci.electronics Subject: Re: Z80-SIO chip programming Message-ID: <2571@iscuva.ISCS.COM> Date: 18 Jul 89 15:40:11 GMT References: <6914@kean.mun.ca> Organization: ISC Systems Corporation, Spokane WA Lines: 39 Mail bounced, so here goes... In article <6914@kean.mun.ca> andrew@kean.mun.ca writes: >...darn Z80-SIO chip... >Can _anyone_ please tell me how to set the darn thing to 8 bits, no parity, >1 stop, and no handshaking (if possible)? You must program write register 4 first in order to correctly program the SIO. An OTIR instruction is ideally suited to the purpose of programming SIO's. To the appropriate command port send: $18 ; WR0: Channel reset $18 ; Do it twice in case the part was out-of-sequence. $04 ; WR0: Select WR4 $44 ; WR4: /16, 1 stop, no parity $01 ; WR0: Select WR1 $00 ; WR1: No interrupts $03 ; WR0: Select WR3 $C1 ; WR3: Rx 8 bits, No Auto Enables, Rx Enabled $05 ; WR0: Select WR5 $EA ; WR5: Assert DTR, Tx 8 bits, Assert RTS, Tx Enabled. That should do it. The SIO kicks the cookies out of most other common serial chips for flexibility, but without a manual it's a bit hard to use! Its only real lack is it has no baud-rate generator. I would take the SIO over the 265x/266x series, or that nasty 8250, or the 8251/6850 (oldies)... The DUSCC is a clear winner, the SCC is just an enhanced SIO, but they did change a few things that can get you if you're not careful. -- +----------------+ ! II CCCCCC ! Jim Cathey ! II SSSSCC ! ISC-Bunker Ramo ! II CC ! TAF-C8; Spokane, WA 99220 ! IISSSS CC ! UUCP: uunet!iscuva!jimc (jimc@iscuva.iscs.com) ! II CCCCCC ! (509) 927-5757 +----------------+ "With excitement like this, who is needing enemas?"