Hi friends, I have try to send hex data to the transmitter which have PIC microcontroller via usb serial port. It has 9600baud rate, 8 bits, 1 stopbit, noparity. The protocol is data, data, data, check sum. When the data is right, the green led in the device will blink once. same for the 32. What is happening??? I tell it to send two hex number, it sends four!!??!? Isn't it doing what you ask? Sending a U8 value to a serial port will send 8bits=1character=0-255. Converting t hat U8 to a string and then sending it to the serial port will send 2 characters, each in the range 0-9A-F.
|
Ranch Hand
posted 9 years ago
Hi All,
I am trying to write java application which read/write data from/to serial port , I have found this application in the net
(http://www.captain.at/howto-java-serial-port-javax-comm-rxtx.php) which is a very good example.
According to the logs I am able to write into the port but am not able to read from the port..
Any one can help to fix the issue
WriteReadSerialPort.java
I am trying to write java application which read/write data from/to serial port , I have found this application in the net
(http://www.captain.at/howto-java-serial-port-javax-comm-rxtx.php) which is a very good example.
According to the logs I am able to write into the port but am not able to read from the port..
Any one can help to fix the issue
WriteReadSerialPort.java
Bartender
posted 9 years ago[How To Ask Questions On JavaRanch]
Ranch Hand
posted 9 years agoHi Joe Ess,
Thanks alot for your , I Have nothing is plugged into the port.
Thanks alot for your , I Have nothing is plugged into the port.
Bartender
posted 9 years agoIf nothing is plugged in, you can't really read anything. You may be able to set your port to local loopback but it's been a long time since I've worked with serial ports and I've never used RXTX to do it.