Path: utzoo!utgpu!watserv1!maytag!xenitec!zswamp!root From: root@zswamp.fidonet.org (Geoffrey Welsh) Newsgroups: comp.dcom.modems Subject: UARTS and Buffers... Message-ID: <7150.27F96188@zswamp.fidonet.org> Date: Tue, 02 Apr 91 12:46:49 EST Organization: Izot's Swamp BBS - Kitchener, Ontario >From: ST7021@SIUCVMB.BITNET >Recently someone brushed on two different UARTs, the 16450 >and the 16550. >Can someone give me an idea of what the difference between >these two chip is? The 16450 is essentially the same as an 8250, and they're plain UARTs. When a word is received, it is transferred into a holding register and an external signal is generated (usually an interrupt request). If the CPU fails to read the receive data register before the next incoming word is completed, the data word is lost. This can be caused by heavy multitasking loads, long DMA cycles (Perstor ARLL controllers) or switching a 286 processor from protected into real mode on an ISA machine (DOS extended memory access or DOS compatibility box under OS/2). The 16550 has, in place of the single byte data registers, a 16 byte FIFO buffer. This way, if the CPU can't react quickly to the interrupt request, the data is stored and recalled in order rather than lost. The CPU may also write sixteen bytes for transmit in stead of one, and the interrupt request may be set to trigger on different buffer fill levels, reducing the interrupt overhard on the CPU. While not as effective as a smart serial board (like a DigiPort or Arnet SmartPort), the 16550 can solve data loss problems and reduce CPU loading without losing compatibility with drivers designed for the 8250 (this is especially important if you're running DOS standalone, under a multitasker (Concurrent DOS, DesqView, PC-MOS, Windows, etc.), or in a compatibility box such as VP/ix, DOSmerge, or RUNDOS (for QNX). Few drivers will detect and enable the 16550 (though more and more are appearing), but many drivers designed for the 8250 will work with a 16550 after the FIFO buffers have been enabled externally. >The reason that I bring up MPt is because >the PS/2 tech ref manual says that my mod 80 has a 16450. >Anyone have an idea of what the truth is? If a program reports that it has found a 16550, then it has found a 16550. I am not aware of any other UARTs that could easily be mistaken for a 16550 unless the program was not written to National Semiconductor's specs. If you like, I can ship you a copy of a little DOS program I wrote to detect the 16550 and control its buffers. I had also heard that the NS16550A was the 'standard' UART on the PS/2. >One last question - why doesn't the everyday serial port >have a small buffer on it? I guess that the UART in itself was such a big step that putting buffers on them didn't seem necessary right away. Certainly the majority of micros with UARTs didn't need buffers, as modems above 1200 bps were rare a decade ago and it is only in the past four years or so that 9600, 19,200 and now even 38,400 are common. Some home machines do RS-232 without any UARTs, let alone buffered ones. The Commodore 64 and 128 are examples. BTW, the C128, with proper code, can do 9600 bps without a UART... any interested parties netmail me for details. >Do modems with buffering overcome this problem? Actually, I think they make it worse. A 9600 bps modem with synchronous framing (such as MNP3 or LAP-M) can provide data at a speed higher than 960 CPS, usually requiring the serial port to be operated at 19200 bps. So, even though you're only going to get throughput around 1150 CPS on most compressed data, the hardware must be able to handle bursts of data at 1920 CPS... the average load over a long period might not be much higher than a 9600 bps connection, but it can, for those short periods, be an effective 19200 bps load. -- 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 The mile is traversed not by a single leap, but by a procession of coherent steps; those who insist on making the trip in a single element will be failing long after you and I have discovered new worlds. -- me