|
-
Apr 24th, 2002, 02:42 AM
#1
Thread Starter
Member
Parallel Port
HI,
I make a software that will control a door through the paraller port. I would like through my software to be able to the different paraller port pins, i,e, set them to HIGH or LOW whenever I want to.
Any ideas how can I manage that? Can you please provide me with some code example?
Thanks a lot!
H.
-
Apr 25th, 2002, 02:47 AM
#2
Thread Starter
Member
Thanks for your reply.
Can you please send me some code examples for Visual Basic, i.e. how to put a specific pin HIGH or LOW?
Thanks a lot!
H.
-
Apr 25th, 2002, 07:27 AM
#3
Good Ol' Platypus
Well, lets say you have 3 pins that you're using. The address that they're at (Parallel port is &3F8 or something like that) can be assigned a byte value (8 bits). Therefore, you can control the first 3 bits by assigning this value:[Highlight=VB]Value = Pin1 + Pin2 * 2 + Pin3 * 4[/vbscript]
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Apr 25th, 2002, 08:00 AM
#4
Frenzied Member
that can be done without any IO dll?
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 25th, 2002, 02:47 PM
#5
Good Ol' Platypus
Someone said you can use the Print function using LTP1: as the file. I haven't tried it, however.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Apr 25th, 2002, 03:00 PM
#6
Fanatic Member
To control the individual LPT lines you really should use the dll, it's not possible with VB. You also can't control the serial ports using VB!
-
Apr 25th, 2002, 03:50 PM
#7
Frenzied Member
hmm well yeah but I could write to it as much as I want right?
pretty interesting..
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 26th, 2002, 01:27 PM
#8
Member
-
Apr 26th, 2002, 02:26 PM
#9
Fanatic Member
WIN95IO also does the thing right. I'm not sure if it works fine with Windows NT.
Using VB, we always can access the output data lines (for LPT), but not the inputs. Concerning the COM ports, using the VB communications control we can use some more serial registers, but not all of them. For that: use the dll.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|