Path: utzoo!utgpu!watserv1!maytag!xenitec!zswamp!root From: root@zswamp.fidonet.org (Geoffrey Welsh) Newsgroups: comp.dcom.modems Subject: UARTS for speed... Message-ID: <5073.274CAD27@zswamp.fidonet.org> Date: Thu, 22 Nov 90 18:27:48 EST Organization: Izot's Swamp BBS - Kitchener, Ontario Cliff Yamamoto (cyamamot@kilroy.jpl.nasa.gov ) wrote: >I've been running my serial line at 38.4Kbaud on my 386 clone for a few >weeks now without any problems (not running Windows or Deskview). However, >I've heard that one can change the UART to offload some work on the CPU. It may look like I'm contradicting what I said before (specifically, that a 16550 won't help anyone who's not already having problems with an 8250 or 16450) but I'm not, really: The 16550 will let you trigger receive interrupts at various receive FIFO levels (up to 14 bytes) and write up to 16 bytes when the transmit FIFO is empty. So... *IF* the software is configured to do it, installing a 16550 *can* reduce CPU overhead slightly. However, you won't feel the difference. (That's why I'm not really contradicting what I said before). >Can anyone tell me if the 8250, the 16450 and the 16550A are pin-for-pin >interchangable? I'm not sure if I have the 8250 or the 16450, but I'd like >to eventually plug in a 16550A. Also do all three share the same port and >programming characteristics? Are 16550A readily available? All three are pin compatible. The 16550 powers up in 16450 mode, for all programming intents identical to to the 8250. To activate the FIFOs, you write to a read-only status register. I'd like to give full specs, but Matthew Desmond (matt@spinq.uucp for flaming purposes) has my National datasheets. Here's a quick DOS Turbo Pascal program I hacked together to enable the FIFOs on a 16550 and set the trigger level to 1 byte (which won't lower your overhead but it will make sure that you stop losing incoming bytes): PROGRAM NS16550A; VAR address: ARRAY[ 1 .. 4 ] OF word; portnum: integer; temp: string; BEGIN WriteLn; WriteLn('NS16550A Buffer Control ((C)) 1989, 1990 by Geoffrey Welsh, v901010'); WriteLn; address[1] := $3fa; address[2] := $2fa; address[3] := $3ea; address[4] := $2ea; IF ParamCount = 0 THEN BEGIN WriteLn('Enables or disables FIFO buffering on a specific COM port'); WriteLn; WriteLn('USAGE: NS16550A COM{1|2|3|4} {ON|OFF}') END { IF ParamCount } ELSE BEGIN temp := Copy( ParamStr(1), 4, 1 ); portnum := Ord( temp[1] ) - 48; IF (portnum < 1) OR (portnum > 4) OR (Length( ParamStr(1) ) <> 4) THEN WriteLn('Improper port # given') ELSE BEGIN IF (ParamStr(2) = 'on') OR (ParamStr(2) = 'ON') THEN BEGIN WriteLn('Enabling buffer...'); Port[ address[ portnum ] ] := 1; IF Port[ address[ portnum] ] < 64 THEN WriteLn('There doesn''t seem to be a 16550 at COM', temp[1], '!') END ELSE IF (ParamStr(2) = 'off') OR (ParamStr(2) = 'OFF') THEN BEGIN WriteLn('Disabling buffer...'); Port[ address[ portnum ] ] := 0 END ELSE WriteLn('Improper on/off instruction given.') END { IF portnum ELSE } END { IF ParamCount ELSE } END. If you're serious about lowering your overhead, you might want to invest in a smart serial card. Mind you, they're a lot more expensive that 16550s (hundreds of bucks vs. $25!) -- UUCP: watmath!xenitec!zswamp!root | 602-66 Mooregate Crescent Internet: root@zswamp.fidonet.org | Kitchener, Ontario FidoNet: SYSOP, 1:221/171 | N2M 5E6 CANADA Data: (519) 742-8939 | (519) 741-9553 MC Hammer, n. Device used to ensure firm seating of MicroChannel boards Try our new Bud 'C' compiler... it specializes in 'case' statements!