Re: using serial or parallel port for TTL input
- From: "scada" <scada@xxxxxxxxxxxxx>
- Date: Fri, 18 Nov 2005 18:08:45 -0500
<chad@xxxxxxxxxxxxxxxx> wrote in message
news:1132254545.707421.320160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> HI,
>
> 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
> :http://repairfaq.ece.drexel.edu/sam/laserexp.htm#expbbd
>
> 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?
>
> thanks
> chad
>
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.
.
- References:
- using serial or parallel port for TTL input
- From: chad@xxxxxxxxxxxxxxxx
- using serial or parallel port for TTL input
- Prev by Date: Re: Hacking a SunPCi card - anyone tried this?
- Next by Date: Re: why the signal from a 50-ohm output impedance device should be checked by a scope channel with a 50-ohm input impedance?
- Previous by thread: Re: using serial or parallel port for TTL input
- Next by thread: Re: TSSOP Exposed Pad - How do I solder?
- Index(es):
Relevant Pages
|