|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This site uses Google Analytics to track visits.
Privacy Statement |
PC Serial PortInformation on the PC Serial Port
• Serial Frame
The table below shows some serial frame specs for different baud rates.
* It takes a minimum of 10 bits (1 start bit, 8 data bits, no parity, 1 stop bit) to transfer 8 bits of real data. Real data rate is equal to 1/(BitWidth * 10), or Baud/10.
• stty, Linux Serial Port Setupstty is a command line tool for setting up the serial port. Below are some examples of use. Set Baud to 9600, use one stop bits.
> stty -F /dev/ttyS0 9600 -cstopb
Set Baud to 115200, use two stop bits.
> stty -F /dev/ttyS0 115200 cstopb
Set Baud to 115200 and character size to 5 bits (can be 5 to 8). Enable parity, set to odd parity.
> stty -F /dev/ttyS0 115200 cs5 parenb parodd
Set Baud to 115200 and character size to 8 bits. Enable parity, set to even parity.
> stty -F /dev/ttyS0 115200 cs8 parenb -parodd
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||