• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

How to prevent WinXP from sending non-zero bits to parallel port when loading Windows?

Good day. I am having problem with my parallel port which is connected to a simple DIY alarm device. My alarm will sound whenever a "1" was send to pin 2 (or Data Port) of LPT1, and off when "0" bit was sent. The alarm is working properly using Visual Basic program I developed.

The problem is, when Windows is loading, it seems that XP is sending some non-zero bits to LPT1, causing my alarm to sound. Probably it's detecting the parallel port. Is there any way to prevent XP to do so so that my alarm won't sound everytime I start/restart my PC?

Thanks and hope to hear from you soon.
0
cwchan80
Asked:
cwchan80
1 Solution
 
jhanceCommented:
I suspect you'd find that the LPT device drivers in doing some sort of self-test or other hardware detection during the initialization of the driver.  Unfortunately, apart from removing the driver itself (which is possible) and writing your own LPT port driver (which is also possible but more complex than a VB program) you'll have to learn to work around this.

Two suggestion:

1) Generally data on the LPT port is only flagged to be valid when the STROBE (i.e. pin 1) is LOW.  So your external hardware should gate any action involving the data bits with pin 1 being active.  This may also require a change in your VB application in order to set/reset pin 1 but in the end you'll have a more robust setup.

2) Alternatively, you could use the state of TWO pins being in opposite states to signal your device.  This way you would not get triggered by the "all low" state of init but only by your VB app's setting of bit 0 to a "1" and bit 1 to a "0" at the same time.
0
 
waffleironheadCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

accept jhance's comment as answer

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

waffleironhead
EE Cleanup Volunteer
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now