[comp.laser-printers] How fast is a parallel port?

les@chinet.chi.il.us (Leslie Mikesell) (03/15/91)

In article <9103132036.AA25596@crayola.cs.UMD.EDU> wcs@erebus.att.com (William Clare Stewart) writes:
>I'm trying to find out how to connect big laser printers (50-100ppm)
>to normal computers, in particular to 386/486 boxes running UNIX.

>Are there any parallel port boards out there with hardware support
>and/or DMA?  It wouldn't take much to do some simple buffering.

The AT&T IPC802 board has 8 serial/2 parallel ports - I'm not sure
about the buffering scheme but it requires much less CPU to
drive it than the motherboard parallel port.

Les Mikesell
  les@chinet.chi.il.us

pipkinsj@cpqhou.se.hou.compaq.COM (Jeff Pipkins @Adv Dev@SE hou) (03/16/91)

In article <9103132036.AA25596@crayola.cs.UMD.EDU> wcs@erebus.att.com (William Clare Stewart) writes:
>I'm trying to find out how to connect big laser printers (50-100ppm)
>to normal computers, in particular to 386/486 boxes running UNIX.
>For a variety of ugly reasons, I don't want to use Ethernet -
>I'd really like to use a parallel port.  But nobody I've talked to
>knows how fast a parallel port can go on a typical machine, and
>nobody's tried it at speeds over about 10ppm.
>
>50-100 ppm is 1-2 pages/second, or typically 40-80 kilobits/second;
>not much faster than a 38.4 kbps RS-232 port.
>At least on our machines, and on the parallel port boards anyone
>knew about, the Centronics driver was simple - the sender toggles a
>lead when there's a byte to send, and the receiver toggles a lead
>(causing hardware interrupt) after it reads it.  So the hardware guy
>says "The port can go as fast as the software will handle interrupts."
>After all, the traditional dot-matrix printer didn't need a whole
>lot of CPU to feed it data, so there's no hardware assist.
>
>Does anybody know how fast the typical 386/33 or 486 box running UNIX
>can push data out the parallel port?  Has anybody tried it?
>How much CPU does it burn?  Unfortunately, I don't have access to a
>big printer to try it - is there some way to make a parallel port
>READ data on UNIX?  DOS programs like LAPLINK or its equivalents can
>get fairly high performance, but they're single-tasking programs
>that can sit there and poll the hardware, rather than sharing a
>multi-processing machine.
>
>Are there any parallel port boards out there with hardware support
>and/or DMA?  It wouldn't take much to do some simple buffering.

First of all, it is difficult to say just what the "Centronics standard"
is.  Although you can find timing diagrams for very old Centronics
printers, the timing varies from printer to printer, and as a standard
per se, it doesn't exist.  There is a Dataproducts standard, and there
is what has come to be called the "IBM-Centronics" standard.  Timing
diagrams for the latter can be found in almost any of IBM's printer
manuals, or in several of their technical reference guides for the PC.

It is true that sending bytes over a standard PC parallel port is a
CPU-sucking activity.  But on very fast CPUs such as you have mentioned,
care must be taken not to violate the timing.  In writing a faster
parallel driver you must take into account the timing diagram as well
as any automatic delays imposed by the interface hardware itself (e.g.,
don't forget the 2 Jmp $+2 instructions between in/out instructions,
and the hardware may cause the delay to be longer than the clocks for
those to instructions)

Most laser printers I have played with can't take data any faster than
about 30KB/s.  I have seen an IBM AT (8 MHz?) pump out around 60 - 80KB/s
with a custom driver that I wrote.

The timing diagram limits the speed to about 500KB/s, so there is an upper
bound; you can't just crank up the software as fast as it will go on a
486/33!  MS-DOS and BIOS provide a significant CPU overhead in sending
bytes.  You can get a 15x speed increase just by bypassing DOS and making
a BIOS call for each character to send.  Even with just BIOS, the unnecessary
CPU overhead is very significant.  By driving the port directly and sending
blocks at a time, you can approach 100x increase over the usual MS-DOS/BIOS
combination -- nearly 2 orders of magnitude!  If you use the PRINT program
provided with DOS, then the difference is much more striking; PRINT not only
makes your machine run like a dog, but it is also much slower in sending
bytes than a simply copy to prn.  PRINT also has a terrible habbit of
cooking the characters sent (expanding tabs, etc.), so if you need to
send 8-bit data, forget PRINT.

Programs like LAPLINK and PC-LINK(?) enjoy significant advantages over
normal parallel port transmission.  The most important advantage is that
they don't have to adhere to anyone else's standard.  They can use a
custom cable and custom software.  They can require you to have an
interrupt (IRQ) line available on both sides, and they can use it in
much smarter ways than the way it's normally used.  So comparisons with
products of this type are misleading at best.

Compaq's SystemPro line, which are popular as servers, have DMA capabilities
built into the parallel port.  I don't remember the transfer rate (I think
it's somewhere around 150KB/s, but don't quote me on that), but the
biggest advantage is that you get to keep all of that CPU time.  The only
CPU overhead is in setting up the transfer, which is small when you send
a block of bytes at a time.  It's not hard to use, and it's fully
documented in the technical reference guide.  I don't know of any existing
drivers for it, but there may be; more likely you will need to write one.

Although I work at Compaq, the opinions I have expressed here are my own,
and I do not represent Compaq.

Good luck!

-- 
Jeff D. Pipkins
Jeff=Pipkins%Adv=Dev%SE=Hou@bangate.compaq.com  or  uunet!cpqhou!pipkinsj
Disclaimer: My opinions do not necessarily reflect those of my employer.
"Things should be made as simple as possible, but no simpler" --Einstein

Richard_Werezak.tor_demo@xci.xerox.com (03/21/91)

In article <9103132036.AA25596@crayola.cs.UMD.EDU> wcs@erebus.att.com (William
Clare Stewart) writes:
>I'm trying to find out how to connect big laser printers (50-100ppm)
>to normal computers, in particular to 386/486 boxes

If the big printers which you are talking about are Xerox lasers you can
connect a PC two ways:

	a) Centronics parallel thru a 'SPUR' box to the printer.
	b) Via a PC bus board directly to the 3211 controller on the printer
		(called a 'DataWare' or Seqoyah board)

both options are available from your local Xerox PS Rep.

I have customers using both methods at rated speed.  It depends what you are
sending down to the printer. If you are sending line mode data with lots of
fonts changes and forms invocations .... rated speed since the printers are
intelligent and most of the processing occurs at the other end of the
transmission. If you are sending lots of bitmap graphics .... very slow unless
you are requesting multiple copies.

Hope this helps.

-Richard
RWerezak@TORHO.Xerox.COM
(416)972-7040

jonb@specialix.co.uk (Jon Brawn) (03/22/91)

In article <9103132036.AA25596@crayola.cs.UMD.EDU> wcs@erebus.att.com (William Clare Stewart) writes:
>I'm trying to find out how to connect big laser printers (50-100ppm)
>to normal computers, in particular to 386/486 boxes running UNIX.

>Are there any parallel port boards out there with hardware support
>and/or DMA?  It wouldn't take much to do some simple buffering.

The RIO Product from Specialix International supports a Centronics-style
parallel port. The cpu overheads are way down on the traditional PC centronics
interface. Contact your local area office for more details.

Jon Brawn.
-- 
---
Usual disclaimers about this being my opinion.