[PARPORT] how does EPP/ECP hardware behave?

From: Peter Asemann (sipeasem@immd3.informatik.uni-erlangen.de)
Date: Thu Jan 09 2003 - 12:33:32 EST

  • Next message: Tim Waugh: "Re: [PARPORT] how does EPP/ECP hardware behave?"

    As you might still remember I'm into simulating parallel port hardware on a
    very low level.

    So I need to know what real parallel port card hardware does.
    I'll write down my understanding of the things hoping you'll correct my
    misunderstandings. If I talk about "hardware" i have a pc parallel port host
    hardware card/superio chip in mind, btw..

    - In SPP mode the hardware will take put the data written to the data
    register onto the data lines and automatically set the strobe signal for a
    predefined time. Depending on configuration, the hardware will continue
    sending even if the peripheral did not acknowledge the receiving, or wait for

    - In PS/2 or tristate mode you can put the hardware in bidirectional mode by
    toggling bit 5 of the control register. If the peripheral has some data to
    send, it'll pull the ACK (PtrClk) line low to indicate that, while the host
    hardware has to set autofeed (hostbusy) low before to indicate it's ready to
    receive something.

    - In EPP mode the hardware handles the EPP handshake for me and sets the
    lines depending on if i write to the data or address registers. Well - I've
    no idea how I get informed about the peripheral did send something.

    - In ECP mode the hardware handles ECP handshake as well as RLE encoding if
    activated. I suppose the RLE decoding of data sent from the peripheral also
    is done in hardware? Is it, from the viewpoint of the linux drivers, so that
    they only outb their data to the data/address register and the hardware does
    the rest of the job? What happens if something goes wrong? Does the hardware
    send an interrupt or is the software accessing the parallel port supposed to
    look into the status register from time to time?

    In general the problem is that I want to use all the modes from an user mode
    program that shall simulate a piece of hardware to another program which is
    not aware of the fact that the hardware it accesses in fact is my simulator
    program. So I need to know how real hardware behaves from the viewpoint of
    linux low level parallel port drivers so my program can behave in the same
    way. React on writes and reads to/from it's virtual registers in the right
    way, set it's status register properly, and such.

    The simulator program itseld shall also act as a bridge to the real hardware
    and "transparently" connect the real hardware to the program accessing the
    simulator program. So I also need to know how to access the parallel port
    hardware from a linux user mode program.

    I've read something about some IEEE1284 library and ppdev and other drivers
    that might be of help?

    Peter Asemann

    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --

    This archive was generated by hypermail 2b29 : Thu Jan 09 2003 - 12:36:34 EST