home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / fast550.zip / FAST550.DOC < prev    next >
Text File  |  1993-04-15  |  19KB  |  378 lines

  1.  
  2.     Technical Note : FAST SERIAL PORTS
  3.             Author : Michael Spalter, S/E/G Communications
  4.              Email : segcom@cix.compulink.co.uk
  5.             Origin : United Kingdom, EC
  6.      Last Modified : 13th April 1993
  7.             Status : (c) 1993 Michael Spalter
  8.  
  9.     NOTE: This document may be distributed  freely  providing  that  all
  10.     credits  remain  intact  and that it is not modified in any way. Any
  11.     suggestions for improving this document are welcome. Please  contact
  12.     the  author  as  shown  at  the foot of the document. Bulletin board
  13.     sysops are welcome to make this file available as a 'Bulletin'. This
  14.     document is provided for information only and no support or warranty
  15.     is offered by the author or publisher.
  16.  
  17.  
  18.                      ┌────────────────────────────────┐
  19.                      │ DO I NEED A FAST SERIAL PORT ? │
  20.                      └────────────────────────────────┘
  21.  
  22.          ┌───────────────────────────────────────────────────┐
  23.          │                 C O N T E N T S                   │
  24.          │                                                   │
  25.          │  0) INTRODUCTION                                  │
  26.          │  1) What is a UART ?                              │
  27.          │  2) Why the sudden craze for high speed cards ?   │
  28.          │  3) Why aren't normal PC ports good enough ?      │
  29.          │  4) How would I know if I needs a faster port ?   │
  30.          │  5) Okay, I want one ! What should I buy ?        │
  31.          │  6) Is there just one type of 16550 UART ?        │
  32.          │  7) Replacing a soldered 16450/8250 UART          │
  33.          │  8) Windows and buffered UARTS                    │
  34.          │  9) Supplier information                          │
  35.          └───────────────────────────────────────────────────┘
  36.  
  37.  
  38.     INTRODUCTION
  39.     ------------
  40.  
  41.     Fast  serial  cards  have  become  very  popular  lately  due to the
  42.     proliferation of high speed (V32/V32bis) modems. Whilst the computer
  43.     press have been keen to cover modems in general, little coverage has
  44.     been given to  serial  cards  (they're  just  not  sexy  enough  for
  45.     mainstream  articles).  This  means that, whilst many people want or
  46.     need fast serial cards, there is much  confusion  about  them.  This
  47.     document attempts to answer the most common questions asked.
  48.  
  49.  
  50.     1) What is a UART ?
  51.        ----------------
  52.  
  53.     Throughout this document, we will refer to something called a 'UART'
  54.     (pronounced 'you-art').  As this is a very important  component,  it
  55.     is important to understand what it is.
  56.  
  57.     A  UART  is  an IC (chip!) which takes parallel data from the PC and
  58.     outputs it to the serial port as a timed serial stream of data.   It
  59.     is  the  main component of the serial card; all other components are
  60.     there to support the UART.  Here is a simple functional diagram:
  61.  
  62.         PC's BUS Slot                         Serial port
  63.         1 ------------> ╔════════╗
  64.         1 ------------> ║  UART  ║
  65.         0 ------------> ║        ║
  66.         1 ------------> ║        ║ ---------> 11010001
  67.         0 ------------> ║        ║
  68.         0 ------------> ║        ║
  69.         0 ------------> ║        ║
  70.         1 ------------> ╚════════╝
  71.  
  72.     The diagram shows conversion of data from a  parallel  to  a  serial
  73.     stream. Of course, serial ports can receive data as well as transmit
  74.     it, so the UART also converts serial data back into parallel data.
  75.  
  76.  
  77.     2) Why the sudden craze for fast serial ports ?
  78.        --------------------------------------------
  79.  
  80.     Now that high speed modems (V32, V32bis) have  become  very  common,
  81.     many PC serial ports are having problems running fast enough to keep
  82.     up  with the modems which can be driven at speeds of up to 57600 bps
  83.     (bits per second).  A standard '8250 UART'  based  serial  port  (or
  84.     one  using a multi i/o chip) cannot possibly run at that speed.  The
  85.     '16450' UART is only slightly better.
  86.  
  87.  
  88.     3) Why aren't normal PC ports good enough ?
  89.        ----------------------------------------
  90.  
  91.     Standard serial ports were designed  to  drive  mice,  plotters  and
  92.     modems.  At the time, modems ran at speeds of up to 4800 bps, and we
  93.     thought that was fast - anyone who has been using  modems  for  more
  94.     than  5  years  will  remember how lucky we thought we were !
  95.  
  96.     Problems with serial ports arise for two reasons:
  97.  
  98.     a) The 8250/16450 or equivalent UARTS are simply not fast enough  to
  99.        run  at  the  high  speeds  required  by  fast modems. Whilst the
  100.        BIOS/UART  will  allow  you  to select these speeds, they may not
  101.        reliably work at these speeds. The chips are rated for high speed
  102.        use, but that assumes a simple working enviroment (not a PC!).
  103.  
  104.     b) PC's are busy things, with lots of interrupts to service. If  the
  105.        port is running  at  high  speed,  the  PC  may  miss  interrupts
  106.        generated by incoming  data  because  it  is  'busy  doing  other
  107.        things'  -  this  then means that the UART has nowhere to put the
  108.        incoming  byte  and  so  it  gets  overwritten  by  the next byte
  109.        received. This usually causes CRC errors.  The faster  you  drive
  110.        the port, the more CRC  errors  you  will  get.  This  is  almost
  111.        always a problem if you multitask with MS-Windows or Desqview, as
  112.        the rapid task switching keeps the processor very busy.
  113.  
  114.     The '16550' UART gets around both of these problems:
  115.  
  116.     a) It is designed to run at  high  speed;  a  16550  chip  will  run
  117.        happily  at 57600 bps or faster which is fast enough for even the
  118.        fastest modem.
  119.  
  120.     b) The 16550 UART incorporates a 16 byte buffer;  if  the  PC  isn't
  121.        ready to received the current byte then the UART can retain it in
  122.        the  buffer  until  the  PC is ready for it.  16 bytes provides a
  123.        comfortatble time margin to ensure that none of the received data
  124.        is lost.  Many communications packages will empty the FIFO buffer
  125.        at every interrupt possible, rather than only taking one byte per
  126.        interrupt.   The  buffer  on  the  UART is a 'FIFO' buffer.  This
  127.        simply  means  that the first byte in will be the first byte out.
  128.        The alternative to this would be a LIFO buffer, but that would be
  129.        useless for a UART as all the data would become scrambled !
  130.  
  131.  
  132.     4) How would I know if I needed a faster serial card ?
  133.        ---------------------------------------------------
  134.  
  135.     If you are multitasking using MS-Windows or Desqview, then you  will
  136.     almost  certainly need a fast buffered serial card. Typical symptoms
  137.     will be CRC errors or block retries reported when downloading files.
  138.     As you will probably be using error correction,  then  these  errors
  139.     are unlikely to be caused by anything else.
  140.  
  141.     Another  symptom  of an inadequate serial port is that you're simply
  142.     not getting the performance you'd expect from your modem. This could
  143.     be caused by you not having your modem configured correctly,  so  in
  144.     the  first instance, check with your suppliers or colleagues/friends
  145.     for any special setup strings particular to your modem (perhaps  you
  146.     have  forgotten  to enable RTS/CTS handshaking or data compression).
  147.  
  148.     If  you  have your modem set up correctly and your performance still
  149.     isn't what it ought to be, then a faster  serial  card  may  be  the
  150.     solution.  On  a  V32bis/V42bis modem, you should be able to achieve
  151.     download speeds of up to 3000 cps on ASCII  text,  or  1500  cps  on
  152.     compressed  (e.g.  ZIP)  files.   Remember that poor phone lines can
  153.     also affect modem performance.
  154.  
  155.     Even if you are not using Desqview or MS-Windows, you may still  get
  156.     the  symptoms details above, especially if you are driving the modem
  157.     at 38400 bps or faster, in which case you would be wise to invest in
  158.     a faster serial card. Having said that, there are some people  using
  159.     high  speed  modems  whose  existing serial port may be adequate, in
  160.     which case there is no point investing in a faster one !
  161.  
  162.  
  163.     5) Okay, I want one, what should I buy ?
  164.        -------------------------------------
  165.  
  166.     The  important part about a fast serial card is its UART; this means
  167.     that you may be able to simply swap the UART of your existing serial
  168.     card, rather than having to fit a whole new card.  You can  only  do
  169.     this  if your current serial card uses a 40 pin UART (8250, 16450 or
  170.     equivalent). This needs to be  socketed  for  easy  removal,  unless
  171.     you're  particularly  experienced  with  a  soldering iron and fancy
  172.     desoldering the chip yourself - this is detailed in section (7).
  173.  
  174.     Unfortunately,  most PC's nowadays seem to come with multi i/o cards
  175.     with one multi-purpose chip which performs serial, parallel and disk
  176.     operations; if you have a multi i/o card, it will normally be a PLCC
  177.     package in the centre of the board ( a flat 'surface  mounted'  chip
  178.     with pins on all four sides). This obviously cannot be replaced with
  179.     a   16550.   Some  PC's  have  the  i/o  circuitry  built  into  the
  180.     motherboard; it is unlikely that you can replace the UARTs there.
  181.  
  182.     Thankfully, and more easily, you can simply buy  a  new  card  based
  183.     around a 16550 UART. This can either replace or add to your existing
  184.     serial  ports and your supplier will advise you on the best type.
  185.  
  186.  
  187.     6) Is there just one type of 16550 UART ?
  188.        --------------------------------------
  189.  
  190.     No! As with all  semiconductors, many manufacturers have  jumped  on
  191.     the 16550  bandwaggon. This is good inasmuch that there is a choice,
  192.     but bad in that some manufacturers have got it  wrong  -  some  have
  193.     FIFO  buffers which don't work and some aren't  recognised correctly
  194.     by applications (this can sometimes be worked around but ideally get
  195.     one which you know will work).
  196.  
  197.     The 16550 chip 'by which others are  gauged'  is  made  by  National
  198.     Semiconductor, and the part no. is NS16550AFN.  There is an older NS
  199.     version,  but  make  sure you order the 'AFN' type. If your supplier
  200.     stocks a different 16550 version, ensure that it is 100%  compatible
  201.     with the NS16550AFN, and ideally get a guarantee that you can return
  202.     it if you find that it isn't ! The NS type is the most expensive, so
  203.     you will probably save money by buying a clone, but take note of the
  204.     above guidelines.
  205.  
  206.     The  FIFO  buffer  on  a  16550 chip can be enabled and disabled. By
  207.     default it will be DISABLED. Many comms programs will  automatically
  208.     detect  and  enable the FIFO buffer, but if yours doesn't, there are
  209.     several programs to enable them,  which  you  can  include  in  your
  210.     AUTOEXEC.BAT file or another batch file. Ask your supplier.
  211.  
  212.     There are several programs around to test 16550 chips, once they are
  213.     installed  so you'll soon know if your new chip/card is okay. If you
  214.     can't get hold of one, ask around on BBS's or ask your supplier.
  215.  
  216.     Both  US  Robotics and Hayes make high speed serial cards  which are
  217.     very flexible; ask your supplier for details. If your local supplier
  218.     cannot get hold of a fast serial card, see section (8).
  219.  
  220.  
  221.     7) Replacing a soldered 8250 or 16450 UART
  222.        ---------------------------------------
  223.  
  224.     If your existing UART is a soldered 16450 or 8250 type  (40 pin DIP)
  225.     and you are competant with a soldering iron, then you  may  want  to
  226.     remove  the  chip yourself and replace it with a 40 pin socket (into
  227.     which you plug your new 16550).  It is not  too  complicated  -  the
  228.     most important thing is to work slowly and carefully.  Here are some
  229.     useful tips from Bob Kellock:
  230.  
  231.       >>>> ALWAYS OBSERVE STATIC PRECAUTIONS WHEN HANDLING CHIPS <<<<
  232.  
  233.     Get  hold  of a scrap double sided printed circuit board to practice
  234.     on; it's no use practicing on a single sided board as they're easy !
  235.  
  236.           >>>>>> DO NOT ATTEMPT TO REMOVE THE CHIP WHOLE ! <<<<<<
  237.  
  238.     Get hold of some fine nosed wire cutters and chop off  each  of  the
  239.     legs of the UART as close to the body as possible (therefore leaving
  240.     as much of the leg on the board as possible). Discard the main body.
  241.  
  242.     Then,  remove  each  of  the legs in turn using a soldering iron and
  243.     tweezers. (Editors note: Bob says "real men use their fingers",  but
  244.     I'd  still recommend tweezers). Don't 'wiggle' the iron about on the
  245.     surface of the board as you will probably damage the tracks/pads  by
  246.     doing so. The time between applying the iron and pulling the leg  is
  247.     fairly critical - just keep practicing.
  248.  
  249.     Make  sure  you  pull  the  leg out square from the board or you may
  250.     damage the tracks/pads on the component side.
  251.  
  252.     You may find that it helps to tin the iron with new solder  now  and
  253.     then,  but don't use too much otherwise you may end up with a pubble
  254.     of solder, which will be a read problem.
  255.  
  256.     Get hold of some solder wick or a solder sucker to remove the solder
  257.     from the vias (holes in the board where the legs came from).   As  a
  258.     last  resort  you  can  use  stranded wire and Fluxite but it's very
  259.     tedious. You may find that some holes just don't want to  clean  out
  260.     - resolder them with fresh solder and try again.
  261.  
  262.     Check that the holes really are clean - they can be deceptive.  Hold
  263.     the board up to the light and check that you  can  see through  each
  264.     clearly.  Clean  off  at  least the component side of the board with
  265.     PCB cleaner or meths; use it in a well ventilated room using a stiff
  266.     brush - an old toothbrush is ideal.
  267.  
  268.     Carefully  inspect the component side of the board - preferably with
  269.     a magnifying glass.  You can get minute  traces  of  solder  between
  270.     pads  which  completely  messed  it  up.  Remove any odd bits with a
  271.     scalpel. Check that there is plating  through  the  holes  -  it  is
  272.     possible  to  pull  it  out with the leg but it's not too terrible.
  273.  
  274.     Insert  the  socket  in  the  board  with  the  notch  in  the right
  275.     direction. This is when you may find out that one (or more!) of  the
  276.     holes isn't cleaned out properly. Do it again.
  277.  
  278.     Solder  socket  in position, clean, inspect and rectify as above. If
  279.     you lost any of the through hole platings then solder those pins  on
  280.     the top side of the board too.
  281.  
  282.     The board is now ready to take your new 16550 chip. Remember to take
  283.     static  precautions  (earth  yourself and don't rub your slippers on
  284.     the nylon carpet). Ensure that all pins on the 16550  are  straight;
  285.     if  they  are  not,  carefully  press the chip on a table at a right
  286.     angle to straighten them. Pins tend of break if they  are  bent  too
  287.     much, so be careful.
  288.  
  289.     Place  one  side of the chip just into the socket; do not push it in
  290.     yet. Then, place the other side's pins just into the  socket.  Check
  291.     that all pins are in the right holes and that they are all straight.
  292.     Slowly  press  the  chip into the socket using even pressure, making
  293.     sure no pins snag on their way in. Once it's in. Give it a firm push
  294.     against the table to make sure everything  is  home  tightly.  Check
  295.     that  the  chip  is  inserted properly, the right way round and that
  296.     none of the pins have curled up under the body instead of  being  in
  297.     its correct hole.
  298.  
  299.  
  300.     8) MS-WINDOWS and high speed UARTS
  301.        -------------------------------
  302.  
  303.     Microsoft  Windows  is  a  prime  cause of lost interrupts.  This is
  304.     mostly due to the fact that MS-Windows  is  processor  intensive  so
  305.     with  high  speed modems, it is even more likely that data will come
  306.     in quicker than the PC can service  the  interrupts.  This  is  made
  307.     worse by the fact the Windows Multi-tasks.
  308.  
  309.     A  properly  configured  16550 UART should solve these problems, but
  310.     there is a slight complication with Windows 3.1; if you  enable  the
  311.     UART's  FIFO  buffers  (using a 16550.EXE or whatever), then Windows
  312.     won't recognise the COM port any more; this is strange  because  the
  313.     MSD  program supplied with 3.1 will happily report the presence of a
  314.     16550 UART. If your Windows software is '16550 aware' then  it  will
  315.     happily get around this, but if you Windows software doesn't, or you
  316.     are  using  DOS  software  under Windows, then you may have to use a
  317.     replacement COM driver, or use different software.
  318.  
  319.  
  320.     DOS Applications Under Windows
  321.     ------------------------------
  322.  
  323.     A  company  called  Cherry Hill Software have produced a replacement
  324.     comm driver for Windows 3.1 called CHCOMB.386 which will enable  DOS
  325.     programs running under windows to recognise 16550's properly.  It is
  326.     added  to  your  WIN.INI  file.   It is almost freeware - the author
  327.     expects either  a  US$10  donation  or  a  tacky  postcard  for  his
  328.     collection.  They can reached by email at 76050.2204@compuserve.com.
  329.  
  330.     The following lines should also be amended in WIN.INI:
  331.  
  332.     device=*combuff      (delete this line - its in your WIN.INI)
  333.     device=chcomb.386
  334.  
  335.     [386Enh]
  336.     COM3FIFO=true
  337.     COM3Buffer=10000
  338.     COMBoostTime=4        (normally 2)
  339.     COMIrqSharing=true
  340.  
  341.     Experimentation  may be required and doubtless there are people more
  342.     experienced than me on Windows and 16550's so if you have  something
  343.     to add, please email me and I'll amend this document appropriately.
  344.  
  345.  
  346.     9) Supplier information
  347.        --------------------
  348.  
  349.     S/E/G  Communications,  based  in  London, England, stock a range of
  350.     16550 UARTs and 16550 based serial cards at very competitive prices.
  351.     For full details and pricing information contact:
  352.  
  353.         ┌────────────────────────────────────────┐
  354.         │                                        │
  355.         │    S/E/G Communications                │
  356.         │    137 Hale Lane                       │
  357.         │    Edgware                             │
  358.         │    Middlesex HA8 9QP                   │
  359.         │    Tel: (081) 959 3377                 │
  360.         │    Fax: (081) 959 2137                 │
  361.         │    Email: segcom@cix.compulink.co.uk   │
  362.         │                                        │
  363.         └────────────────────────────────────────┘
  364.  
  365.     Credit Card orders are welcome. Trade enquiries welcome.
  366.  
  367.  
  368.             ------------------ End of Document ----------------
  369.  
  370.     (c) 1993 Michael Spalter, S/E/G Communications
  371.  
  372.     This  document may only be distributed un-modified.  Reproduction as
  373.     part  of  any  commercial  transaction  or  distribution   via   any
  374.     non-electronic  medium is prohibited in part of full without written
  375.     permission from the author.
  376.  
  377.                           ----- end of file -----
  378.