RE: [PARPORT] Reading from pin - help.

From: MERRETT, David (
Date: Wed Jan 01 2003 - 17:47:27 EST

  • Next message: Calle Be: "[PARPORT] Simple C prog needed"

    As a Hardware engineer, I can see where Pawel is coming from.
    Its frustrating whenever one wants to do something unconventional with PC
    hardware ports.
    It is possible that you'll have to write your own low level driver,
    especially if you dont have any clock or ack signals.

    Two ideas worth investigating are:
    1. Is it easier to read data through CTS line of the serial port?
    2. Get onto the DALLAS web sites and other hobbyist sites to find examples
    of code.
    (see previous mails)
    Good lUck!

    -----Original Message-----
    From: Matthew Duggan []
    Sent: Friday, 20 December 2002 11:55
    To: Pawel Stochlinski
    Subject: Re: [PARPORT] Reading from pin - help.

    Pawel Stochlinski wrote:
    > The program idea is to read a data from dallas 1820 temperature sensor
    > is connected to the PIN 10 (ACK) of LPT port.
    > All i want to do, is to use a simple, quick code that will read the
    pin 10.
    > All i have red about reading paraller ports is to use:
    > x=inb(STATUS); (for statusports)
    > Hey, but this is not all! I want to read a BYTES from pin 10, not a
    state of
    > ALL pins in statusport.
    > Please, tell me, how can i read ONE pin (for example pin nr. 10[ACK]),
    > there any quick, simple method?


    If I understand you correctly, you wish to *serialise* the information
    on pin 10 of your *parallel* port. That's not as easy as it sounds. To
    know that the data has changed, you need two timing pins (clock in, ack
    out) for a start.. one pin is not enough. Once you have that, you need
    to busy-read the port, read in a new bit whenever the clock signal goes
    high, set ack high, wait for clkin to go low set ack low, etc, etc.
    It's ugly, but serialising data from a single pin of the parport isn't a
    particularly common task.

    - Matthew

    -- To unsubscribe, send mail to: --
    -- with the single word "unsubscribe" in the body of the message. --

    -- To unsubscribe, send mail to: --
    -- with the single word "unsubscribe" in the body of the message. --

    This archive was generated by hypermail 2b29 : Wed Jan 01 2003 - 17:53:20 EST