Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Parallel port communication using Java Comm

Posted on 2001-06-02
4
338 Views
Last Modified: 2012-06-27
When we write on the parallel port using ParallelPort.getoutputStream().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.
0
Comment
Question by:alinasim
4 Comments
 

Expert Comment

by:megloff
ID: 6150199
yes there are some callback of the printer. Have you tried with othe rpogramming languages like "c" ?. I can't remember that we have to set up any control register that the output will apear at the pins. So this is the strange part about it.

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.


 

0
 

Author Comment

by:alinasim
ID: 6156952
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 ?
0
 
LVL 5

Expert Comment

by:vemul
ID: 7752131
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
0
 

Accepted Solution

by:
Banath earned 0 total points
ID: 7842824
Per recommendation - PAQ'ed and points refunded

Banath
EE Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question