Java Glossary : parallel port

CMP home Java glossary home Menu no menu Last updated 2004-06-28 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

You are here : home : Java Glossary : P words : parallel port.

parallel port
hardware to which you may attach a parallel printer or Centronics interface device. Sun have created a Java Communication's API which defines a platform-independent way to do parallel port communication. You can get javax.comm from JavaSoft.

Unfortunately Sun's API is of little use. The problem is that the interface is designed with the assumption that you have a printer out there and want to talk to it - a most unlikely assumption. If you just wanted to print, there would be no need to use javax.com; you would use the standard printing api.

Far more likely, you have a robot, a geiger counter, a numerically controlled sewing machine, a kinetic sculpture, or other bizarre device that you want to control via bit fiddling. Unfortunately, the javax.comm interface doesn't let you do this. The typical way of controlling a non standard device through the parallel port is to merrily ignore the control lines for the most part, or use them in some bizarre way, and pump data through the output lines. Input is done by absconding with the control in lines, and use them in ways Centronics never imagined, e.g. to read nifty stuff like whether the dragon is fully submerged.

Presumably the sun engineer implemented javax.comm by reading the Centronics printer spec. Too bad, he/she missed the point of why you need a javax.comm interface. You will have to roll your own with JNI.

If you are tinkering with a home brew interface, tie the parallel port status lines 10 and 11 (Ack and Busy) to low/ground and lines 12, 13 and 15 (paper out, select, and error) to high/5V. The javax.com software will not work without properly simulated status signals.


CMP logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 3540.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/parallelport.html J:\mindprod\jgloss\parallelport.html