calculate baud rate