Shop OBEX P1 Docs P2 Docs Learn Events
Questions about PSC USB communication. — Parallax Forums

Questions about PSC USB communication.

NuiNui Posts: 3
edited 2006-04-01 18:10 in General Discussion
Hi

I'm developing the Java code to communicate with the Parallax Servo Controller (USB version). I'm using SUSE Linux and Java USB API. The code to send and receive the data to the usb device is finished but I still cann't communicate with PSC USB. I'm investigating·many possible·reasons of this failure.

- Range of byte:
·· I send and receive the data as an array of bytes. But the range of byte in Java is signed byte (-127 to 128)·while the range of byte in PBASIC is unsigned byte (0-255). I see the ASCII table and find that the value from 0 to 127 is represented numbers and characters which should be enough to use in communication. I want to know whether the PSC USB will return any value which is greater than 127? And what is that value·standing for?·So I will write the code to convert the range of byte in Java to be 0 to 255.

- FTDI Driver:
·· Is FTDI chip, FT232BM, on the PSC USB·required a driver to communicate on the linux? As far as I know, the driver to communicate with any serial device·is not required.· For serial communication,·it·can work well without driver installation. I also make something similar to this in my Java code: detecting the PSC USB, claim the USB interface, and transmit the data. But I didn't install the driver for FT232BM. Is this cause the problem?

- Array of Byte:
·· I would like to know how the SEROUT and SERIN work with the data? Does it transmit the data one byte at a time? e.g. "!SCVER?"+CR will be sent as 0x21 +·0x53 +·0x43 +·0x56 +·0x45 +·0x52 +·0x3F + 0x0D. Or are they sent as an array to the PSC board?

Please help me. Thank you very much.
Sign In or Register to comment.