Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!mips!apple!well!farren From: farren@well.sf.ca.us (Mike Farren) Newsgroups: comp.sys.amiga.tech Subject: Re: A Cost Effective MULTI-SERIAL Device Proposition Keywords: Multi-Serial Input Ouput Hardware Options Expansion Message-ID: <16037@well.sf.ca.us> Date: 8 Feb 90 10:25:45 GMT References: <76649@tut.cis.ohio-state.edu> <15996@well.UUCP> <5194@convex.convex.com> Distribution: usa, world Lines: 41 A little clarification seems in order. First off, "just plain dumb" was my own judgement of the merits of a "bit-banging" serial interface for the Amiga, and not any kind of comment on the poster. As to why I consider the idea "just plain dumb", here's a bit of my reasoning, based on my own experience programming just such an interface on two separate occasions: The timing required for any full-duplex serial port makes it quite difficult to get reliable results at any baud rate above 1200, unless you are willing to dedicate the processor totally to the job. At 2400 baud, you have approximately 450 microseconds in which to grab a bit, shift it in (if it's a data bit), set a timer so that you can get the next bit, move the completed byte to a buffer if it's the final bit in a word, check to see if it's time to send an output bit out, get the next output byte if it's the last bit of a given word, update the buffer pointers, and last (but certainly not least) allow the application that's doing the communicating to do whatever it is going to do with the data. And that's not even counting OS overhead if you're trying to work in an OS-compatible way. Unless you are running a dedicated application which totally takes over the whole system, you're just not going to have enough time to handle all of the details of operation, unless you make severe sacrifices somewhere in the chain. The problem is simply in the amount of small-scale bit-fiddling you have to do in such a setup. The only time I was ever able to get a scheme like this to be useful was when I was programming a dedicated controller to do it, entirely separate from the main CPU. And even then, the absolute maximum speed I could get out of the thing was 4800 baud. 9600 baud gave me only 120 microseconds per bit, which was barely enough time to do all of the housekeeping necessary for either the input or output word, and not both. This was, admittedly, with a rather crude processor (an Intel 8021), but it wasn't THAT crude - it had a one microsecond instruction time, which isn't that far off from the actual instruction execution time of the 68000 at 8 MHz or so, when you factor in memory cycle time, and the multiple cycle nature of many 68000 instructions. -- Mike Farren farren@well.sf.ca.usa