Parallel Port Tutorial
I need a full tutorial on how to use parallel ports in VB, how can i control a circuit using Visual Basic 6.0, i want to know what i will need [libraries ...] and that's about it.. i'm a newbie in this type of programming so...
I've changed the title of your post, as the initial title was misleading. Hopefully you'll get a few useful answers this way...
First you have to know that parallel port not accessaple directly from the Win NT based system, cause of security reasons, microsoft has decide to allow app. written in kernal mode to deal with parallel port, so logix4u.com develop a dll library that allow developer to deal with parallel port this library contain a .sys file inside it which work as an parallel port driver when you use this dll its check if the parallel port driver loaded or not, if its not loaded, it extract and setup its internal driver and allow you to read and write to PPT, this library contain 2 easy API statment.
Follow the following link
and then download
you can use the samples in ZIP, or you can use the follow both are easy.
you have to know that parallel port has 8 data channel and 8 grounds and status , control channels,
Private Declare Function Inp Lib "inpout32.dll" Alias "Inp32" (ByVal PortAdress As Integer) As Integer
Private Declare Sub out Lib "inpout32.dll" Alias "Out32" (ByVal PortAdress As Integer, ByVal Value As Integer)
Private Sub WriteToChannel(Index As Byte)
Dim PPT_Pulse As Byte
PPT_Pulse = PPT_Pulse + (2 ^ Index)
Call out(888, PPT_Pulse)
The index is a value from 0 to 7, if you wana turn off all channels write
Call out(888, 0)
The 888 is the base address of parallel port,
if you wana more of details just googling on "Parallel port programming tutorials"
Hope this help you :), mail me if you need somthing.
Hi there one better way to do parallel port interfacing is with the use of inpout32.dll, search for this the web, another way is with the use of the hwinterface.ocx, this one provides advantage for visual basic programmers, this offers 2 major methods inport for reading and outport for writing. Best regrads to you.
where do i get hwinterface.ocx
I've got my hwinterface.ocx in a package that also contains the inpout32.ocx. as said you can download it for free @ logix4u.com. hwinterface.ocx can be used as a component in vb6 and is much simplier to use than tha inpout32.dll , good luck...
Hi Sir ...I tried all the instruction on how to use this dll or ocx file,this function is ok when I write data to the port like out(888,2) but when I used to read the data from port like the instruction inp(888) or inp(val("&H378")) there is no data comming out.My sensor is connected to pin 7 and when i test this no data or value is comming from the pin. I tried pin 10,11,12 to 13 pin from parallel port for the sensor and still no data is comming when i use the inp function for reading.my computer is pentium 4 and xp service pack 1 os.Is there other configuration from the port so that I can read the data from the port if i want to test my motion sensor?
Hope you can help me Sir cause I really need this...I try hard just to finished my program.
I will appreciate any suggestion from you Sir cause I know you can help me Sir.
i need parallel port tutorial in flash ,in which compleatly show the discription of parallel port
Ramil that ocx worked in my project before, try to check out the motion sensor. Try to check out if it really send a +5V back to the port...There are lots of factors to be considered but then lets try to start answering your question with that.
inpout32.dll wont register because it is not an OLE DLL
You have to call it using declares like you would with Windows API calls.
The headers are:
Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" _
(ByVal PortAddress As Integer) _
Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" _
(ByVal PortAddress As Integer, _
ByVal Value As Integer)
and I found these at http://www.lvr.com/parport.htm
in a sample file http://www.lvr.com/files/test_inpout32_vb6.zip
Did you do a search for inpout32.dll?
- arif ahmad replied to How to receive data in web ...
- William Thompson replied to What is the name of the Win...
- Sameera Piyadigamage replied to Point of Sale Developers: H...
- Scott Carline replied to 4 x C# Developers for large...
- Rajendra Dhakal replied to Restore SQL Server text dat...
- cloud rainda replied to How to convert between TS f...