Now we going to use java to control real world application. this is the basic one.
-************************************************************************************-
|any way there is the all project details for who interesting in this type of things.|
|this is fully tested & its working greatly. but I’m not responsible for any hardware |
|soft wear damages, use this with your own risk. and thank you for using this project. |
-************************************************************************************-
-********************************************using this project in your pc***************************************************-
JDK want to be installed in your PC to run this project.
JDK can be free download from www.sunMicrosystems.com or any JDK downloadable website.
install it if you don’t have, then go to java install directory\java\jdk1.6.0_16\bin
now copy this path.
as a example,
C:\Program Files\Java\jdk1.6.0_16\bin
then go to My computer right click on it now go to,
My Computer properties >> Advanced >>Environment Variables >>path >>Edit.
past your path after ";".
as a example,
other path:\Program Files\Java\jdk1.6.0_16\bin
now ok>>ok>>apply.
done.
_-_********************set DLL path********************_-_
now open the ioPort.java file using note pad or any text editor, then change the :"C:\\WINDOWS\\system32\\jnpout32.dll" to
your jnpout32.dll path.
_-_********************port & pin Address********************_-_
the program is written to glow L.E.D that connect to parallel ports pin number 5 if you want to change,
it there is the pin values in hex.
*****************************************
|pin 2 = 0x01; |
|pin 3 = 0x02; |
|pin 4 = 0x04; |
|pin 5 = 0x08; |
|pin 6 = 0x10; |
|pin 7 = 0x20; |
|pin 8 = 0x40; |
|pin 9 = 0x80; |
*****************************************
pin 1 is by default settled to N/O means normal on then it contain 5v+ every time we don’t use that pin in this time.
you can use pin number 2 to 9 for get out puts.
after any changes save them (do not change any thing over instructions if you don’t have more knowledge about java).
now double click the run.bat for test when you run the program will launch the CMD and print
some things, see any errors printed in the CMD (i hope you have some knowledge about java).
to turn off port use oxoo. in front of pin address.
as a Example - pin x = 0x00;
_-_********************correcting errors********************_-_
if errors will be occurred you can run and watch default sample for make sure you don’t make any change for the program.
1| check your path settings, it want to be set to your JDK path.
2| check the ioPort.java's dll path. the path is want to be set to jnpout32.dll,location and use two \\ to separate path.
or one of / for the separate path.
3| check the ioPorts name it want to be "ioPort.java" name = ioPort extension = .java.
4| make sure the dll is exist in windows\system32\ if u want to use the sample program without any modifications.
5| after all done now program want to be work.
_-_********************running program********************_-_
now run the program by double clicking run.bat.if settings are correct program will run without any errors.
_-_******************** Parallel Port hardware********************_-_
use the provided circuit diagram to build circuit for parallel port.
after all done run the bat file again and you will see the L.E.D was glowing.
Parallel Port.png for circuit diagram.