|
Welcome to my Visual Basic Site : |
||||
|
I have made this site for all the people who want to learn about How to send and get Binairy data from your LPT Port with Basic and/or Visual Basic. |
||||
|
We are NOT RESPONSEBLE for any damage on your computer. |
||||
|
1. When you put something on your LPT Port , please do your computer off first |
||||
|
So , i shall try to explaine what the meaning is of this site. I want to make a contoling center for my house.
When you want to do this , you need some things :
Ad1 : Computer. Ad2 : The programm language Basic or Visual Basic. This is a very easy to learn and to handle. Ad3 : The printer board is also easy. |
|
Here is some Info about your LPT Port. |
|
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
First you need a DLL to use your Lpt Port with Visual Basic. My fiend wrote that piece of software for you ( not for windows2000). poort.dll (196kb) and it is legal. Place this DLL in the windows directory. Declare Function SchrijfLPT Lib "poort.dll" (ByVal PortAddress As Integer, ByVal PortData As Integer) As Integer Declare Function LeesLPT Lib "poort.dll" (ByVal PortAddress As Integer) As Integer
Now you must use them. The data you get and put to LPT Ports are always Binairy. Dec Binair example 1. The value of textbox 1 will be send to LPT1. Make a button and an inputtextbox.
example 2. The value of LPT1 will be put in Textbox 1. Make a button and an inputtextbox.
Some one has send me this program port.dll . I don't know if it's legal. port.zip(26KB) The next program i have write for you is vbprog3.( 29 KB ) |
![]() |
|
Now i show you how to controle a steppermotor . If you want to controle it , you must know how they works. The most steppers have 4,5,6,8 or 10 wires. |
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here you can see how to connect a stepper to your computer. |
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
The motor turns to the right. This is Full Step. |
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is the source code for fig 1 - fig 3 with Visual Basic. SchrijfLPT( 888 , 1) in Basic out 888 , 1 Most steppers are 180 steps / 360 grd. That means that you must repeat this program 180/4 = 45 times. This is the source code for fig 4 - fig 9. SchrijfLPT( 888 , 1) Most steppers are 180 steps / 360 grd. That means that you must repeat this program 180/4 = 45 times. |
|
|
|
|
|
|
|
|
|
|
|
|
copyright © 2000 - 2008 Majosoft |
|||
|
|
|||