Title: Variable Baudrate for serial port possible?
Tags: c;serial-port;rs485
Question: The baudrate is normally set to one of the specified values, like 9600, 56k and so on.
Is it possible to select another value, like 123456 Baud? Its an numerical parameter, so why not?
Comment: You should probably add what operating system and platforms you are targeting, as a correct answer depends on both of these.

Here is the accepted answer: The clock of the communication module is usually derived from the system clock.
this system clock can be devided by specific numbers , like 2,4,8..
that's why you can reach only to specific baudrates.
Because you are talking on asynchronous protocol , clock is not transmitted on lines.
all of the above , cause the industry to decide on list of acceptable baudrates
BUT , if your two communication modules support special baudrate like 17800 you can work with it.
Comment for this answer: Actually, it's fairly normal to use a rate register and a countdown register.  The rate is programed as a clock count into the register, and the countdown register starts with the value in the rate register and counts down to zero.  Generally this will produce a value that's 2 to 16 times the target baud rate, and further division produces the actual rate.

Here is another answer: Under Windows you set the baud rate of a serial port using SetCommState which takes a device control block structure as a parameter.  The BaudRate element of this structure is used to set the baud rate and can either be a constant value,e.g. CBR_4800, or your own specified value, e.g. 4801.  Whether any value works is hardware dependent, i.e. whether or not the UART or SIO in use allows your specific baud rate.  It's a while since I've worked with these things, but it is possible the baud rate must be a multiple of an input clock rate provided by some other piece of hardware, such that certain rates may not work.  Note that my experience relates to RS232, as opposed to RS485, but I believe the same SDKs are used.

Here is another answer: Generally a serial adapter is designed to only operate at certain "standard" bit rates -- 50, 110, 150, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, etc.  In practice many adapters are implemented partially in software and can run any rate (within the range of their counters), but the (de-facto) standard doesn't require that you can specify such arbitrary rates.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 3, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2011:00:09/21/11', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<c><serial-port><rs485>', 'Title': 'Variable Baudrate for serial port possible?', 'ViewCount': 1316, 'id': 7499128, 'user_AboutMe': '<p>Software Developer since 2001.\nWorking on Linux and Windows projects, using Realtime environments (RTAI/Kithara). Also working with Oracle, MySQL and PostgreSQL.\nMy favorite languages are C#, C++ and Perl.</p>\n', 'user_AccountId': 539501.0, 'user_DisplayName': 'Magistratsbeamter', 'user_Reputation': 102.0, 'user_Views': 21.0, 'user_id': 907355.0}}