alinasim
asked on
Parallel port communication using Java Comm
When we write on the parallel port using ParallelPort.getoutputStre am().write (byte) then the signal DOESNOT appear on the pins but if we connect the port with the printer then the printer prints the data byte.
Is there any acknowledgement signal back from the printer which allows the port to make the data byte appear on the pins.
We cannot change the Mode of the Port other than SPP to ECP or EPP or other through Java Comm, although we have changed the Mode in the ROM BIOS.
We want the data byte to appear on the pins as soon as the write method is called. Right now our application stucks after calling the write method if printer is not connected.
Is there any acknowledgement signal back from the printer which allows the port to make the data byte appear on the pins.
We cannot change the Mode of the Port other than SPP to ECP or EPP or other through Java Comm, although we have changed the Mode in the ROM BIOS.
We want the data byte to appear on the pins as soon as the write method is called. Right now our application stucks after calling the write method if printer is not connected.
ASKER
With C language there is no problem in getting the data onthe pins. it is working with C language.
Maybe we'll have to use JNI to map the C function with the java Native Method. But doing it using JavaCOMM still remains my question ?
Maybe we'll have to use JNI to map the C function with the java Native Method. But doing it using JavaCOMM still remains my question ?
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- To be PAQ'ed and points refunded
Please leave any comments here within the
next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
vemul
Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
- To be PAQ'ed and points refunded
Please leave any comments here within the
next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
vemul
Cleanup Volunteer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Perhaps it could be that the Java API internal first will receive a control signal before it writes an output. So make sure which signal could be this. There are 5 control Signals.
Error (-) Pin 15 ..... Failure
SLCT (+) Pin 13 ..... printer online
PE (+) Pin 12 ..... paper error
ACK (-) Pin 10 ..... Acknowledge
Busy (-) Pin 11 ..... Printer is busy
(-) negative logic, active (bit is set) is when 0V DC
(+) positive logic, active (bit is set) is when 5V DC
I guess the SLCT or Busy could disturb your output. Take
a Voltmeter and measure the signals at your printer communication. Try also a little "c" application to see if this is always the problem.