Connect with us

using serial or parallel port for TTL input

Discussion in 'Electronic Design' started by [email protected], Nov 17, 2005.

Scroll to continue with content
  1. Guest


    I would like to be able to use my PC to detect when a transistor is
    high. I have found several circuit designs on how to control a
    transistor from a serial or parallel port, but none for detecting the
    state of transistor.

    I want to build a laser beam break detector like this

    When the beam is broken, a transistor will be triggered and I would
    like the computer to sense when the line is high.

    Can this be done with a serial or parallel port?

  2. Guest

    If you have a logic level signal, simplest thing is to use one of the
    status bits that the printer sends to the computer. There are ways on
    many parallel ports to reverse the data lines too, but you shouldn't
    need to resort to that when you already have dedicated inputs.

    You could alternatively use a control input on the serial port, but may
    need a larger voltage swing for that (or may not - despite outputting
    larger voltages, PC serial ports can often read TTL level signals fine
    in low noise circumstances)
  3. Shouldn't you give it a blood test, or urinalysis?

  4. DaveM

    DaveM Guest

    Chad, since you're obviously a bit uneducated about controlling a parallel
    port, I suggest you look at Jan Axelson's web site at
    Jan has several books on using the parallel and serial ports on a PC to
    control external circuitry, as well as using these ports to monitor external
    events. Check out the parallel port links and you'll learn a lot about
    what you're trying to do. A copy of her book Parallel Port Complete will
    teach you more than you ever wanted to know about the parallel port.

    Dave M
    MasonDG44 at comcast dot net (Just substitute the appropriate characters in
    the address)

    Never take a laxative and a sleeping pill at the same time!!
  5. Guest

    thanks for the link. I think I will order the book.

  6. scada

    scada Guest

    Yes, this can be done very easy with the parallel port. You can use any one
    of the five status inputs on the connector. For example S3 (S7-S0 byte,
    S0-S2 not accesable) is on pin 15. The pin is normally high. I suggest you
    use an opti-isolation IC to interface the port, that way you will protect
    the computer if something goes wrong in your circuit. Use an opto with an
    NPN transistor output, such as the 4N28. Connect the transistor's collector
    to pin 15, and the emitter to any one of the ground pins (18-25). The led
    inside the opto can be connected to your monitored circuit. Now have your
    software poll the port and do it's routine on the bit change.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day