Shop OBEX P1 Docs P2 Docs Learn Events
Java + Spin — Parallax Forums

Java + Spin

TrezitorulTrezitorul Posts: 68
edited 2009-05-21 10:25 in Propeller 1
I would like to interface the propeller with a PC using java and USB. Does anyone have any suggestions as to how this could be done from a java and spin perspective.

Sincerely,

Trezitorul

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-21 04:36
    The most straightforward way is to open a serial port from Java and use the FullDuplexSerial object on I/O pins 30 and 31 (receive / transmit) to send data back and forth between the PC and the Propeller. The PropPlug (or the built-in USB to serial adapter) provides the USB interface to the PC.
  • SRLMSRLM Posts: 5,045
    edited 2009-05-21 04:55
    From the java perspective, you'll need to open a serial port (COM). I'd suggest looking at the book "The definitive Guide to Building Java Robots". It's written to use the BS2, but you shouldn't have to change anything in the java to get it to work with the Propeller (except maybe the baud rate).
  • EnriqueEnrique Posts: 90
    edited 2009-05-21 08:13
    I tried interfacing a PC to a Propeller in Java but had performance problems with the serial connection (maybe I did something wrong). Switched to C# and everything is working fine.
  • jeromelabjeromelab Posts: 31
    edited 2009-05-21 10:25
    I use the ft2xx library and api from FTDI (manufacturer of the chip which is used on the proplug), more reliable,convenient and faster than a standardized comport imho. The lib comes in C/C++ flavor and there is a dll (for win32).
Sign In or Register to comment.