Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Detecting connection com port or parallel port

Status
Not open for further replies.

josvink66

New Member
Hello,

I was wondering if it was possible to connect 2 cable's in a com port or parallel port

So I mean I put a cable in pin 1 and one in pin 2 (just example pin's) and then have some software detect if pin 1 and pin 2 are connected!

I hope that you understand, if anyone has question just ask them and I'm sorry for my English I'm Dutch.

Greetingz

Jos Vink
 
Yes, there is - I do know that older UPSs used this (on a 9/24 pin serial com port) to indicate to the computer/system they were powering that they had switched to battery backup when power failed (I think the old serial port palm pilots also used this scheme to indicate when you pressed the button on the dock to sync); I can't remember off hand which pins they used (likely DTR or CTR to ground?); for a parallel port, something similar can be done - use one of the control port pins and tie it high or low (both ground and 5V are available on that port). Then you just need to write the software to detect that.
 
Hello,

I was wondering if it was possible to connect 2 cable's in a com port or parallel port

So I mean I put a cable in pin 1 and one in pin 2 (just example pin's) and then have some software detect if pin 1 and pin 2 are connected!

I hope that you understand, if anyone has question just ask them and I'm sorry for my English I'm Dutch.

Greetingz

Jos Vink
hi.
The zip file on this link should help.

https://www.electro-tech-online.com/blogs/ericgibbs/122-pc-parallel-port-using-vb5.html
 
hello,

tnx for your reply's!

@cr0sh
I have no idea how to write such software! Do you have an example or something?

@ericgibbs
I don't know how to use that software! can you explain it?
 
hello,

tnx for your reply's!

@cr0sh
I have no idea how to write such software! Do you have an example or something?

@ericgibbs
I don't know how to use that software! can you explain it?

Off the top of my head: No, I do not - but the idea seems simple enough, and if pressed (if I really needed to do it), I could probably hack something up. But there really isn't any need to; solutions already exist (well, on Linux at least!) - see the following links:

**broken link removed**
**broken link removed**

You might also want to check other pages in that HOWTO file as well - the main meat of the monitoring of the port is in the powerd.c source code (look that up on google). You could probably write something similar in nearly any language.

For Windows, I am sure there are ways of monitoring the ports as well to cause a similar action (although it might need some custom DLLs or whatnot to get around Windows weird DONOTTOUCH port issues); some googlefu will go a long way here. Ultimately, though, you are likely going to need to do some coding (although, like I posted above, this has already been done in Linux - so not much is needed there).
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top