|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PC Parallel Port Circuit
Hey everyone, I have a PC related question, so hopefully I put this in the right forum.
You know how you can use your computer to set the status of your parallel port pins? EG 0-+0.7V on a data pin is logic '0', and +2.4 - +5V on a data pin is a logic '1'. You also know how you can use these pins and the ground pins to power electric circuits? Well I was wondering how to externally set the pins to a logic 1 or 0, using a circuit. I want to know because I need to make a receiver for a laser communicator device and I need to be able to set the status of a pin (to be read by the computer) using an electric circuit. Thanks ![]() |
|
#2
|
||||
|
||||
|
Re: PC Parallel Port Circuit
Typically, you'd ground your circuit with the ground pin on the parallel port. Then to set a data pin to zero, you'd connect that pin to the shared ground. To set it to 1, connect it to +5V relative to shared ground.
I haven't done much with parallel ports, but I'd also expect that you'd want to set the pin you're fiddling with to be an input, so the PC isn't also trying to set the pin value. As an added safety, you probably want to connect the pin to ground or +5 through a resister so you limit the current that flows if something goes wrong. Maybe this answered your question, or maybe you already know what I just said and are asking how to accomplish the connections. To answer that, I'd need to know what you're working with. For example, it's easy to do if you have a programmable microprocessor on your circuit board. |
|
#3
|
||||||
|
||||||
|
Re: PC Parallel Port Circuit
Yes. Sort of. It is quite easy to bit bang the pins of the parallel port. The reason I say sort of is your desire to power something. It depends on how much power you are trying to pull. I think you can get away with small power needs but power hogs are another matter.
KitsRUs.com sells a PC Data Acquistion Kit (available here) that I have used with good success. Even if you don't want to use the kit (and you probably don't have to), it has a manual that shows a BASIC program that demonstrates how to access the various data & control signals of the parallel port. The code is a bit criptic but if you are clever and know a bit about HEX you can noodle through it. Quote:
Good luck. Joe J. |
|
#4
|
||||||
|
||||||
|
Re: PC Parallel Port Circuit
Quote:
This Book gives a great example of how to steal power from the parallel port (I recommend the book too by the way, but it is sort of a specialty product). They recommend a MAX756 step up DC-DC converter. For what it is worth. To me it seems like a lot of bother. I would just steal power from a nearby USB port which has a nice juicy 5V pipe ready to supply your current hungry needs! Finally, have you thought about data rates? How fast are you trying to do things (or how fast is the signal you need to service?) ? This matters because Windows can be more or less counted on to insert random 60-100msec delays at times when you need them least. Think about it before you get too far down this path. Joe J. |
|
#5
|
|||
|
|||
|
Re: PC Parallel Port Circuit
With a modern multitasking operating system like windows XP, using the parallel port is a pain. That's why serial async has taken over. You might want to consider using a PIC and a serial or USB connection and pass commands and packets over the buffered serial busses. The PIC would give full control of the device, However for high data rates your going to need to go to programmable DSP's- nasty.
|
|
#6
|
||||
|
||||
|
Re: PC Parallel Port Circuit
Quote:
There are lots of third-party software components which streamline this access and encapsulate it into an ActiveX, .NET or other (e.g. VCL for Delphi) component. Finding a free one of those might be necessary, unless you like the prospects of running MS-DOS 7.11 or Windows 98, in real- or protected-mode. |
|
#7
|
||||||
|
||||||
|
Re: PC Parallel Port Circuit
Quote:
I think it only took me about an hour or two to get it up and running in VB. Joe J. |
|
#8
|
|||
|
|||
|
Re: PC Parallel Port Circuit
There is a driver floating around the net called GiveIO that allows some degree of direct port access under NT operating systems. I have used it with QuickBASIC and FreeBASIC with good success.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Circuit design help - power supply - Non FIRST | Josh Siegel | Electrical | 31 | 24-12-2005 13:47 |
| TTL port to a serial port on a demo board | ImmortalAres | Programming | 16 | 09-07-2005 23:44 |
| Updated: Serial Port Driver Code | Kevin Watson | Programming | 4 | 05-02-2005 18:39 |
| New Serial Port Driver | Kevin Watson | Programming | 16 | 09-01-2005 01:56 |
| QBASIC, Parallel Ports, and Windows XP | Venkatesh | Electrical | 1 | 21-03-2004 19:07 |