Computer Interfacing
Discussions about interfacing and electronics
 

setting custom baudrate

Can I use setserial to set ttyS0 to 76800 baud?


 

       Computer Interfacing Forum Index -> General serial
Author Message
wortel
New User



Joined: 19 Jul 2009
Posts: 3
Location: Utrecht, The Netherlands

Aug 15, 2009 6:14 am

In order to develop an interface for the ELV DDS-110 Function Generator it is required that a serial port communicates on 76800 baud.

Using "stty -F /dev/ttyS0 76800" I get "invalid argument".

Setserial has features as custom divisor but at baud_base equal to 115200 for a clock speed of 1.8432 Mhz, the divisor should be set to 1.5 which is not an integer.
Is there a way around this, e.g. by fiddling with spd_hi or similar? Or maybe there is a much simpler solution?
I use Linux 2.6.27 on an Asus Terminator PC. UART is 16550A.
lamparo99
New User



Joined: 13 Sep 2011
Posts: 1


Sep 13, 2011 10:35 am

When using a serial port with the Linux serial module 8250, you are usually limited to the predefined baud rates in the driver. If you are using a serial card with a non-standard clock, most applications will not be able to use the non-standard baud rates without some modifications. Here are some steps to use for a quick and easy way to get around this.

       Computer Interfacing Forum Index -> General serial
Page 1 of 1



Running on php BB © 2001, 2009 php BB Group
   Lammert Bies     Interfacing     Sitemap     Forum