Parallel port usage in java
I need a function to set and get data from the parallel port (LPT1) under windows. As an output I want to put a byte, to set the level of the 8 pin data port. With 0x00 I want to get low level on all circuit point and high with 0xFF. If there exists several parallel ports on the computer, I want to select one. The voltage should be set until the next function call. As input I want to read from the parallel port. Either with the 8bit data port or by the status signals. (PaperOut, PrinterBusy, PrinterError, PrinterSelected, PrinterTimeout, ...) A function should return the inputs as a byte.
You can use [url removed, login to view] or something like [url removed, login to view] or you write a DLL under C/C++ using in java
The functions should look like this:
void setPort(byte data);
void byte getPort();
void selectPort(String port);
Should work without setting pins to ground. You have to test your work. (input and output) There is no high performance needed.
I have a relays card on the 8 bit data port for testing. Here I want to set the relays be one byte with the function SetPort.
Parallel I need some input. For example I want to get the information from limit switches. I can use the status pins for the input. Or I use the 8 data pins on a second parallel port in input mode.
1) All deliverables will be considered "work made for hire" under U.S. Copyright law. Employer will receive exclusive and complete copyrights to all work purchased. (No 3rd party components unless all copyright ramifications are explained AND AGREED TO by the employer on the site per the worker's Worker Legal Agreement).
Only free source code
Windows XP and Windows 7