Serial port settings in Java?

I am new to Java. I am reading data from a serial port. I got

serialPort.setSerialPortParams(
   9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, 
   SerialPort.PARITY_NONE); 

What is the point 9600, DATABITS_8,STOPBITS_1and PARITY_NONE?

+5
source share
3 answers

9600, DATABITS_8, STOPBITS_1 and PARITY_NONE

9600 BAUD : Baud is synonymous with symbols or pulses per second. In this case, this refers to the number of bits transmitted per second.

DATABITS _8 : 8 bits of data are transmitted simultaneously. This is typical since most machines have 8-bit bytes these days.

STOPBIT S_1 : added one trailing bit to mark the end of a word.

PARITY_NONE: parity . . 1, . . RS-232 , . A checksum CRC . , Ethernet 32- CRC , .

RS-232 . A / (UART) - , Java - . , 10 : 1 + 8 + 1 . 9600 BAUD 960 , 1200 : 9600 , 10 , 960 8 ( 1 ) .

, , 9600,8, N, 1 , , - .

+10

, "serialPort.setSerialPortParams(....", ? , . javadoc

+2

if you are not familiar with the serial port, just read http://www.beyondlogic.org/serial/serial.htm

0
source

All Articles