Parallel port programming in java

anyone please help me!!
I have to send binary data(of numbers 1-255) to parallel port in 8 bit format.
If you have code please send me or help me how to do so...

One post is sufficient.
Next time try "New to Java".
Google ( [url http://www.google.com/search?q=java+rxtx+parallel+port]java rxtx parallel port )

Similar Messages

  • Parallel Port Programming - Pls Help

    Sir / Madam,
    Greetings.
    We are new to writing parallel port programming. We have tried to execute a sample code.
      import parport.ParallelPort;
      class SimpleIO {
        public static void main ( String []args )
          ParallelPort lpt1 = new ParallelPort(0x378); // 0x378 is normally the base address for the LPT1 port
          int aByte;
          aByte = lpt1.read(); // read a byte from the port's STATUS pins
          System.out.println("Input from parallel port: " + aByte);
          aByte = aByte >> 2; // a simple and irrelevant operation
          lpt1.write(aByte); // write a byte to the port's DATA pins
          System.out.println("Output to port: " + aByte);
      }We get the following error:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x10001057, pid=2224, tid=2916
    # Java VM: Java HotSpot(TM) Client VM (1.5.0-b64 mixed mode, sharing)
    # Problematic frame:
    # C [parport.dll+0x1057]
    We are new to this..
    Pls help us. We have connected a parallel port device already.
    Regards
    Rampalli

    This means there is a bug in the driver you are using.
    I would check you have the latest version of Java 5 or 6 and the latest version of the driver you are using.

  • Parallel port programming for a Sun Ultra 5 running Solaris 8

    Hi I'm trying to look for information about reading/writing to the parallel port of a Sun Ultra 5 running Solaris 8. I'd just like to see some basic programs written in C, nothing fancy, just reading and wrting to the port, getting the port address etc. toggling the lines.
    I've tried searching for this information and there is plenty of information about PC parallel port programming with windows or Linux. But there seems to be little for Sun's
    I've tried doing 'man ecpp' but that doesn't really give any clear example. What I need is an idiots guide.
    I've tried searching this Forum and I see that other people have asked the same question before but no one has replied to them. Why is this?
    Thanks if you can help.
    fishman.

    The key is gettting the port into diag mode. Here's a quickly little example that turns all the data pins on and then turns them off:
    #include <sys/types.h>
    #include <sys/conf.h>
    #include <sys/stat.h>
    #include <unistd.h>
    #include <stropts.h>
    #include <fcntl.h>
    #include <stdio.h>
    #include <sys/ecppio.h>
    int fd = 0;
    // ecpp structures
    ecpp_transfer_parms etp;
    ecpp_regs eregs;
    // returns -1 if error otherwise returns fd
    int openoutput()
    fd = open("/dev/ecpp0",O_RDWR);
    if (fd==-1) { return -1; }
    // default is 90
    etp.write_timeout = 10;
    // the big secret
    etp.mode = ECPP_DIAG_MODE;
    ioctl(fd,ECPPIOC_SETPARMS,&etp);
    return fd;
    unsigned char in()
    unsigned char data;
    // from the man pages
    ioctl(fd,ECPPIOC_GETREGS,&eregs);
    data = eregs.dsr;
    return data;
    void out( unsigned char data )
    write(fd,&data,1);
    int main( void )
    int dummy;
    openoutput();
    //all data pins on
    out( 255 );
    scanf("%d", &dummy);
    //all data pins off
    out( 0 );
    scanf("%d", &dummy);
    close( fd );
    return 0;
    }

  • Parallel Port Programming

    After series of trials and searching the forum i was able to get the commapi and install it. i want to design a simple program that can control circuits (i.e to on leds) . the problem is how to write a 1 or 0 bit to a particular pin. i saw different posts on this issue but still haven't got the real solution.
    i also got to know about parport api and have downloaded and istalled it. but when i run the SimpleIO.java that comes with the package i get this error:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_PRIV_INSTRUCTION occurred at PC=0x10001057
    Function=[Unknown.]
    Library=C:\Program Files\Java\j2re1.4.1_02\bin\parport.dll
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
    at parport.ParallelPort.readOneByte(Native Method)
    at parport.ParallelPort.read(ParallelPort.java:37)
    at SimpleIO.main(SimpleIO.java:8)
    plz i want to know what's the cause of this problem, really can't go further on my own and i know nothing on native interface.
    I would be grateful if i can achieve my objective without the parport also.
    How can i write bits to the parallel port plz???????????????
    Thanx in advance

    Why not communicate with the parallel port using the COMM API 2.0?

  • Parallel Port access using Java

    hello guys.. Please Solve my Problem..
    I have to access motor through pc using Parallel Port. I want to know how to program in java to access Parallel Port. So How can i code to access the any Port of Parallel Port. Please Guide me in this..
    I have tried using parport (code given below )---------------->but it gives error hs_err_pid2172.log (error explanation given at last ). Please tell me what is the problem or if u have any other alternative to access  Parallel Port
    //===============================================================================
    //code :
    package parport;
    public class ParallelPort
    private int portBase;
    public ParallelPort(int portBase)
    this.portBase = portBase;
    public int read()
    return ParallelPort.readOneByte(this.portBase+1);
    public void write(int oneByte)
    ParallelPort.writeOneByte(this.portBase, oneByte);
    public static native int readOneByte(int address);
    public static native void writeOneByte(int address, int oneByte);
    static
    System.loadLibrary("parport");
    import parport.ParallelPort;
    class SimpleIO {
    public static void main ( String []args )
    ParallelPort lpt1 = new ParallelPort(0x378);
    lpt1.write(240);
    ===================================================================================
    ERROR file : hs_err_pid2172.log
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x1000107b, pid=2172, tid=2108
    # Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode, sharing windows-x86)
    # Problematic frame:
    # C [parport.dll+0x107b]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    --------------- T H R E A D ---------------
    Current thread (0x02b5c000): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=2108, stack(0x02fd0000,0x03020000)]
    siginfo: ExceptionCode=0xc0000096
    Registers:
    EAX=0x000000ff, EBX=0x26a28380, ECX=0x000000ff, EDX=0x00000378
    ESP=0x0301f2f4, EBP=0x0301f308, ESI=0x26a28380, EDI=0x02b5c000
    EIP=0x1000107b, EFLAGS=0x00010246
    Top of Stack: (sp=0x0301f2f4)
    0x0301f2f4: 10001041 10000378 000000ff 000000ff
    0x0301f304: 02b50378 0301f34c 00989c91 02b5c0f4
    0x0301f314: 0301f354 00000378 000000ff 02b5c6f4
    0x0301f324: 02b5c6f4 02b5c6e4 0301f32c 26a28380
    0x0301f334: 0301f360 26a28618 00000000 26a28380
    0x0301f344: 00000000 0301f35c 0301f384 00982cb1
    0x0301f354: 26a285b8 00988099 000000ff 00000378
    0x0301f364: 0301f364 26a28255 0301f390 26a28618
    Instructions: (pc=0x1000107b)
    0x1000106b: cc cc cc cc cc 33 c0 66 8b 54 24 04 8a 44 24 08
    0x1000107b: ee c3 66 8b 54 24 04 66 8b 44 24 08 66 ef c3 66
    Stack: [0x02fd0000,0x03020000], sp=0x0301f2f4, free space=316k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [parport.dll+0x107b]
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::StubRoutines (1)
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::StubRoutines (1)
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x00295800 JavaThread "DestroyJavaVM" [_thread_blocked, id=2164, stack(0x00870000,0x008c0000)]
    =>0x02b5c000 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=2108, stack(0x02fd0000,0x03020000)]
    0x02b5ac00 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3640, stack(0x02f30000,0x02f80000)]
    0x02b59c00 JavaThread "AWT-Shutdown" [_thread_blocked, id=2204, stack(0x02ee0000,0x02f30000)]
    0x02b59000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3740, stack(0x02e90000,0x02ee0000)]
    0x02addc00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=372, stack(0x02d90000,0x02de0000)]
    0x02adb400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=608, stack(0x02d40000,0x02d90000)]
    0x02ad6c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=3920, stack(0x02cf0000,0x02d40000)]
    0x02ad6000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=808, stack(0x02ca0000,0x02cf0000)]
    0x02ad1800 JavaThread "Finalizer" daemon [_thread_blocked, id=1736, stack(0x02c50000,0x02ca0000)]
    0x02acd000 JavaThread "Reference Handler" daemon [_thread_blocked, id=2728, stack(0x02c00000,0x02c50000)]
    Other Threads:
    0x02acbc00 VMThread [stack: 0x02bb0000,0x02c00000] [id=624]
    0x02ae7800 WatcherThread [stack: 0x02de0000,0x02e30000] [id=580]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 960K, used 262K [0x229e0000, 0x22ae0000, 0x22ec0000)
    eden space 896K, 22% used [0x229e0000, 0x22a11830, 0x22ac0000)
    from space 64K, 100% used [0x22ad0000, 0x22ae0000, 0x22ae0000)
    to space 64K, 0% used [0x22ac0000, 0x22ac0000, 0x22ad0000)
    tenured generation total 4096K, used 344K [0x22ec0000, 0x232c0000, 0x269e0000)
    the space 4096K, 8% used [0x22ec0000, 0x22f161a8, 0x22f16200, 0x232c0000)
    compacting perm gen total 12288K, used 289K [0x269e0000, 0x275e0000, 0x2a9e0000)
    the space 12288K, 2% used [0x269e0000, 0x26a286b0, 0x26a28800, 0x275e0000)
    ro space 8192K, 66% used [0x2a9e0000, 0x2af30f10, 0x2af31000, 0x2b1e0000)
    rw space 12288K, 52% used [0x2b1e0000, 0x2b8306d0, 0x2b830800, 0x2bde0000)
    Dynamic libraries:
    0x00400000 - 0x00423000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\java.exe
    0x7c900000 - 0x7c9b0000 G:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f5000 G:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000 G:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f02000 G:\WINDOWS\system32\RPCRT4.dll
    0x77fe0000 - 0x77ff1000 G:\WINDOWS\system32\Secur32.dll
    0x7c340000 - 0x7c396000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\msvcr71.dll
    0x6d870000 - 0x6dac0000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\client\jvm.dll
    0x7e410000 - 0x7e4a0000 G:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f57000 G:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000 G:\WINDOWS\system32\WINMM.dll
    0x76390000 - 0x763ad000 G:\WINDOWS\system32\IMM32.DLL
    0x6d710000 - 0x6d723000 G:\PROGRA~1\KASPER~1\KASPER~1\mzvkbd.dll
    0x76bf0000 - 0x76bfb000 G:\WINDOWS\system32\PSAPI.DLL
    0x6d730000 - 0x6d743000 G:\PROGRA~1\KASPER~1\KASPER~1\mzvkbd3.dll
    0x6d020000 - 0x6d035000 G:\PROGRA~1\KASPER~1\KASPER~1\adialhk.dll
    0x77f60000 - 0x77fd6000 G:\WINDOWS\system32\SHLWAPI.dll
    0x77c10000 - 0x77c68000 G:\WINDOWS\system32\msvcrt.dll
    0x6d4c0000 - 0x6d4c6000 G:\PROGRA~1\KASPER~1\KASPER~1\kloehk.dll
    0x6d320000 - 0x6d328000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\hpi.dll
    0x6d820000 - 0x6d82c000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\verify.dll
    0x6d3c0000 - 0x6d3df000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\java.dll
    0x6d860000 - 0x6d86f000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\zip.dll
    0x6d0b0000 - 0x6d1de000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\awt.dll
    0x73000000 - 0x73026000 G:\WINDOWS\system32\WINSPOOL.DRV
    0x774e0000 - 0x7761d000 G:\WINDOWS\system32\ole32.dll
    0x5ad70000 - 0x5ada8000 G:\WINDOWS\system32\uxtheme.dll
    0x73760000 - 0x737a9000 G:\WINDOWS\system32\ddraw.dll
    0x73bc0000 - 0x73bc6000 G:\WINDOWS\system32\DCIMAN32.dll
    0x74720000 - 0x7476b000 G:\WINDOWS\system32\MSCTF.dll
    0x755c0000 - 0x755ee000 G:\WINDOWS\system32\msctfime.ime
    0x6d2c0000 - 0x6d313000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\fontmanager.dll
    0x7c9c0000 - 0x7d1d6000 G:\WINDOWS\system32\shell32.dll
    0x773d0000 - 0x774d3000 G:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
    0x5d090000 - 0x5d12a000 G:\WINDOWS\system32\comctl32.dll
    0x6d620000 - 0x6d633000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\net.dll
    0x71ab0000 - 0x71ac7000 G:\WINDOWS\system32\WS2_32.dll
    0x71aa0000 - 0x71aa8000 G:\WINDOWS\system32\WS2HELP.dll
    0x6d640000 - 0x6d649000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\nio.dll
    0x77120000 - 0x771ab000 G:\WINDOWS\system32\OLEAUT32.DLL
    0x10000000 - 0x1000b000 G:\Program Files\Java\jdk1.6.0_07\bin\parport.dll
    VM Arguments:
    java_command: parport.NewJFrame
    Launcher Type: SUN_STANDARD
    Environment Variables:
    CLASSPATH=G:\Program Files\Java\jdk1.6.0_07\bin;G:\java\classes
    PATH=G:\Program Files\PC Connectivity Solution\;G:\Program Files\Java\jdk1.5.0_07\bin;G:\WINDOWS\system32;G:\WINDOWS;G:\WINDOWS\System32\Wbem;G:\Program Files\K-Lite Codec Pack\QuickTime\QTSystem\;G:\Program Files\Java\jdk1.6.0_07\bin;G:\Program Files\Microsoft SQL Server\90\Tools\binn\;G:\Program Files\MATLAB\R2007b\bin;G:\Program Files\MATLAB\R2007b\bin\win32
    USERNAME=shankar
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 7, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 (2 cores per cpu, 1 threads per core) family 15 model 4 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3
    Memory: 4k page, physical 457196k(30972k free), swap 1074312k(241668k free)
    vm_info: Java HotSpot(TM) Client VM (10.0-b23) for windows-x86 JRE (1.6.0_07-b06), built on Jun 10 2008 01:14:11 by "java_re" with MS VC++ 7.1
    time: Thu Oct 09 13:47:18 2008
    elapsed time: 7 seconds

    I have same problem...
    No one more have solve this?
    I alread have tried use RXTX library..
    but I have:
    java.io.IOException: The device is not connected.
    I think that pass-motor don't have correct response for pararell protocol (I need use it with direct write, no ack signal, no read, etc)

  • Bluetooth port programming in JAVA to control a stepper-mo

    dear friends,
    i would like to know how to use the bluetooth port using JAVA code to control a stepper-motor? please give me some sample code with explanations.

    dear friends,
    i would like to know how to use
    the bluetooth port using JAVA code to control a
    stepper-motor? please give me some sample code with
    explanations.Do you have a link to the assignment ?

  • Java and parallel port

    I don't know if this is forum I should ask this question but I didn't find any corresponding
    to java and ports control.
    I'm using Aurox 11.0 linux.
    I wonder if I could control each output (DATA pin) of parallel port separately in
    Java Communications API?. I can control outputs in Java with JNI but I need to run
    program as root. If I would want to create applet which would use parallel port
    I would have to create server with which this applet would communicate (Limitations of
    applets). But this server would have to run as root. It would affect security of system.

    Because of C++ ioperm function. This function requires root privileges. I have JNI Java
    program which can control outputs of parallel port on the level of one byte (write
    whole byte - all DATA outputs) and C++ program which can control outputs of port separately (control of each pin) and both are based on ioperm function. Both require
    root privileges. So my question is: can I control each output pin separately with Java Communications API?. Maybe if I used wholly Java code I could access port with user privileges?.

  • Problem in sending data to parallel port

    Hello,
    I can open a parallel port (LPT1) using java comm api i,e javax.comm.
    but problem in sending data to parallel port,
    I choose the appropriate port(LPT1), it is in bi-directional mode according to BIOS configuration.
    but according to the java program the mode is SSP.
    when i write data to parallel port the volt-meter give a reading of high state for all data pin (pin1 to 9) i,e the parallel port doesnot change state. I am using windows XP.
    What is the solution?

    try it on Open Solaris 10 or Linux platform.
    also just try using the new FileWriter("LPT1").write("Hello");
    on windows platform
    Pravin

  • RXTX Parallel port communication with Pin Printer

    I have successfully installed and configured RXTX-2.0-7pre1 on Linux platform.
    2 printers, one Laser jet printer connected to the Serial port and the other Pin Printer connected to the Parallel port.
    I can print my files out successfully with RXTX on both my 2 printers. But, there is some problem with my Pin Printer performance. The print job is a little slow and the printing is word by word output.
    While the Laser printer received the whole string of my RXTX output and printed them out asap.
    RXTX read my data and write them to the Parallel/Serial port directly, so, for my laser jet printer, it buffered the RXTX output data and processed them all in one. No problem, laser printer works well. But to the Pin Printer, it got the RXTX output and printed them out with no buffer. I am not authorized to deal with the Pin Printer device driver.
    So, my question is that, is there someone knows how to resolve this problem on RXTX side? That is to say, how to modify the source code of RXTX and customize it?
    I wanna know how to create buffer in RXTX, for example, buffering a whole string line and then sending them to the Parallel port. Then, It supposed to be that the Pin Printer will receive once a whole line output and printing line by line in the paper! Not the problemly slowly word by word output!
    Thanks a lot!

    Simple metrics from google should suffice the SUN team from understand the need/huge requirement for supporting Serial and parallel port programming in windows. Platforms would always change and the team at SUN should remain commited in supporting new platforms.

  • HOW TO ACCESS PARALLEL PORT USING JAVA

    hello guys.. Please Solve my Problem..
    I have to access motor through pc using Parallel Port. I want to know how to program in java to access Parallel Port. So How can i code to access the any Port of Parallel Port. Please Guide me in this..

    well I cannot give a more detailed answer than "use the java comm API".
    http://java.sun.com/products/javacomm/
    http://java.sun.com/developer/Books/javaprogramming/cookbook/11.pdf
    However Java wasn't built to do these kinds of operations, so it may well be that the API does not provide the functionality you need. In that case you may need a native library to do the work for you, which can make things a lot more difficult.

  • Java parallel port distance measurement

    I can't figure out how can i measure distance using parallel port with java. i want to create a program in which i will point a laser with the light dependent resistor connected to parallel port and the program will read how far the laser is pointing at... is there a way to do this? sorry if post on a wrong place

    Can you access a parrallel port in java? Yes. There is an api specification for that of which, based on posts here (not personal experience) the best seems to be rxtx at [http://www.rxtx.org/]
    As for whether the device allows you do what you want I have no idea. That would depend on the device and the interface to it.

  • Pre-programmed sequence for data bits on parallel port.

    I've found and made a bunch of vis that allow for interactive high/low control of the 8 data bits on the parallel port. I want to control each pin with a pre-programmed pattern of bits. Any ideas?

    A U8 is an unsigned 8 bit number. To create one place a number control down on the front panel. Right-click on it and select Representation>>U8. To create an array of U8s you place an array control down, and then drag the above numeric into the array shell. You now have an array of U8s, which you can expand and place things in it.

  • Programming Parallel Port

    Hi all!
    I'm new with java and I would appreciate some help!
    What I'm trying to do is to control an external device, like 8 LEDs, to turn them on and off using parallel port, data lines( pins 1....9 );
    Maybe someone of you guys already had made this and you could give me some tips or some direction to follow.
    What I already know is that I have to set one of the parallel bits to +5V and some of them to 0V in order to simulate that the device(printer) is ok.
    I know that I have to use additional library "comm.jar" but in this package there are no useful methods in order to control data lines.
    Maybe I am missing something!
    Thanks

    Try this one: [http://rxtx.qbang.org]
    It's a library for communicating with the seriell and parallel port.
    Here [http://en.wikipedia.org/wiki/IEEE_1284] you will find some helpful links about how the parallel port works.
    And if you stick to the comm.jar, have a look at ParallelPort.getOutputStream()
    Edited by: yawah on 11.12.2009 00:11

  • Java - Parallel Port Printing

    Hi there
    i have connected a DOT- MATRIX printer to my parallel port.i opened port lpt1 as if it were a file .Printing is fine. But if the printer is offline or disconnected my program does not throw an exception.I need to find out whether the printer is connected or not..
    Regards
    Raghavendran

    Might this be because of the windows print spooler? Or have you turned that off?

  • Java Port Programming

    Hello,
    I am a Graduate Student at University of South Florida, Tampa, FLorida. I am working on a project which involves Controlling an Industrial Robot through Internet.
    This project, controlling industrial robot online, I have divided in 2 parts:
    one - sending data over Internet from any PC to the Robot PC.
    I am confident about this first part of the project and plan to do that in Java. And, now I am working on the second part** - sending signals to Robot Controller once we receive the data at Robot PC.
    We have a Robot s/w installed on Robot PC called ATS (Advanced Terminal s/w, DOS Based s/w) through which we can send commands to the Robot Controller. The controller is programmed using ACL (Advanced
    Control Language). And then the controller generates appropriate signals for the motors to drive the Robot. Also, We have a Robot Interface card installed in Robot PC.
    I have thought of 2 ways to achieve the second part** of my project -
    one - once we receive instructions from Internet user at Robot PC, give input to the DOS-Based s/w in appropriate format and execute that.
    two - once we receive instructions from Internet user at Robot PC, give input directly to Robot Controller in ASCII format (Controller accepts ASCII Chars.)
    We don't have any s/w developement kit available for the Robot s/w from the company, so I have to talk to the controller directly, bypassing the s/w.
    Our robot (SCORBOT-ER 9, Industrial Robot, # of axes = 5 + Gripper), its controller, and robot s/w, all are manufactured/developed by the same company - Eshed Robotec.com (Now, Intelitek.com)
    The PC is connected to the controller through RS232 - serial port, and the controller sends signals to the motors of the robot.
    From the PC, ASCII characters are sent to the controller. I have to do 2 things - find out the ASCII characters which are sent to the controller, and then write a Java or C or C++ program to write those
    ASCII characters to the serial port. I will find out the ASCII characters going to the controller, with the help of Serial Data Analyzer device or s/w. So, after that, my task is to write a code to write those ASCII characters to the serial port. I am using Java, Java Servlets for the networking part (for getting instructions from the Internet user), so would it be a good idea to do the program of writing ASCII characters to serial port in Java?, so that all the system will be developed in the same language? or C/C++/VC++ are better options for the serial port part? If we choose C/C++/VC++, then interfacing of this with Java is possible?
    I would really appreciate your guidance in this regard.
    Thanking you in anticipation !
    Mayur Pangrekar

    Hello Michael,
    Thank you !!
    I went to site you specified, I will get more information about port programming from sun site.
    Mayur

Maybe you are looking for

  • How do I get iPhoto to import & store from the camera roll?

    Under iOS 6, it was possible to import photos from camera roll to iPhoto, where they were stored, even if they were deleted from the camera roll. Now, iPhoto has access to the entire camera roll, and I don't see a way to import into iPhoto. My goal i

  • RuntimeException - Transaction Rollback

              Hi,           I am using weblogic 6.1 on WINDOWS platform..           hv few questions on Container Managed Transactions:           1. What is the Bean-default transaction attribute           (If I don't specify any transaction attribute fo

  • SET_BLOCK_PROPERTY

    Hi, I'm trying to set where caluse dynamically, but it is giving me error. SET_BLOCK_PROPERTY ('emp', DEFAULT_WHERE, 'where deptno in ||'''('''select deptno from dept''')''); How to set the "(" in the where caluse ? Thanks in advance.

  • Remove folder in Message

    Dear All, I am newbie using E90, just bought for a week ago, 2 days ago I made new folder in Massage (under My folder), I like to remove it but can`t find out how to do that, any help? Thank you before

  • Help with Migration Assistant

    I have used Migration Assistant to move files over from old Dell machine to iMac 1 - It didn't transfer some files like movies. IS there a way to run it again and select the files that I want to retrieve. 2-It pulled over a number of files that I do