26 votes
Accepted

How do two UARTS know which baud rate to use?

Ordinary UARTs have to be pre-configured with the desired baud rate (as well as word length, stop bits, parity, etc) traditionally by a human. For several decades now though there have been ...
Chris Stratton's user avatar
22 votes

How do some microcontrollers implement baud rates even though it uses crystal frequency not scalable to standard baud rates?

The UART doesn't care as long as it is reasonably exact. \$\frac{15000000}{230400}\approx65\$ \$65\cdot230400=14976000\$ So your UART is going to be too fast by a factor of \$\frac{15000}{14976}\...
Simon Richter's user avatar
18 votes
Accepted

Baud rate vs. Bit rate

A minor point: by definition, a Baud (named after Emile Baudot) is one symbol per second. So your statement, baud 115200 means 115200 bits per second only if each baud = 1 bit. If each baud is ...
user98732's user avatar
  • 655
12 votes

How do some microcontrollers implement baud rates even though it uses crystal frequency not scalable to standard baud rates?

Here is the 'big print' features description of a relatively high end ARM MCU. There are a number of PLLs and dividers with prescalers and postscalers that are capable of creating almost any ...
Spehro Pefhany's user avatar
12 votes
Accepted

Serial communication baud rate issue

This means at each edge we are receiving and data can be lost since edges are not that accurate. A UART (as I believe you are talking about) makes use of start and stop bits to acquire ...
Andy aka's user avatar
  • 452k
11 votes
Accepted

Max SPI data rate supported

In SPI each bit is transmitted on a clock edge, therefore the data rate (in bits) is the same as the clock frequency. Your datasheet is not providing the maximum frequency, but it is providing the ...
Eugene Sh.'s user avatar
10 votes

How do some microcontrollers implement baud rates even though it uses crystal frequency not scalable to standard baud rates?

This can be achieved using a modulator. See for example the MSP430x1xx user guide. On page 260 it says: The USART baud rate generator is capable of producing standard baud rates from non-...
AndreKR's user avatar
  • 2,999
8 votes

How do two UARTS know which baud rate to use?

Two UARTS "agree" on baud rate by means of documentation and by operator/user setting the baud rate by hands, including handshake protocol, stop bit size, etc.
Ale..chenski's user avatar
8 votes

Does a baudrate in serial communication (USB or RS232) need to be exact?

The UARTs typically used in RS232-type serial systems work by sampling the data line somewhere mid bit according to a division of the predefined baud rate base frequency clock. As such, if the sent ...
Trevor_G's user avatar
  • 46.6k
8 votes
Accepted

Time for serial data(UART) transmission

The number of bits to transmit is 32. In addition, there is 1 start and 1 stop bit per 8 or 9 bits (depending what is selected for #data bits), assuming 8 data bits, there are 4 start bits and 4 stop ...
Michel Keijzers's user avatar
6 votes
Accepted

What difference does the clock make in synchronous vs asynchronous communication?

With asynchronous data transmission, when there is no payload data to be sent, the data line becomes idle and therefore the receiver waits for a transition that marks the beginning of new incoming ...
Andy aka's user avatar
  • 452k
6 votes

Baud to bit mapping for the UART?

The UART used in a PC COM port doesn't carry out modulation as such, that would only happen when you send the serial data through something like a modem or radio link where it has to be converted into ...
Finbarr's user avatar
  • 5,664
6 votes
Accepted

Does a baudrate in serial communication (USB or RS232) need to be exact?

The timings have to be accurate enough that they don't drift apart before the protocol resyncronises. UART serial resyncronises on each byte and a byte is around 10 bits (8 bits of data plus start ...
Peter Green's user avatar
  • 22.1k
6 votes

Time for serial data(UART) transmission

It looks like you are transmitting 6 ASCII characters. You don't say if these are sent as 7-bit or 8-bit characters, but suppose 8 bits per character, the worst case. So there are 6 frames consisting ...
user28910's user avatar
  • 3,924
5 votes

How do some microcontrollers implement baud rates even though it uses crystal frequency not scalable to standard baud rates?

A lot of people assume that the UART is actually running on a fixed clock i.e. You take a sample every \$ T \$ seconds. This is not necessarily true. At least not in all the UART modules I've designed....
user110971's user avatar
  • 6,117
5 votes

UART communication not working with higher baud rate values?

I'm guessing that the micro can't hit the higher baud rates accurately enough given the rather low clock speed of 8 MHz. This illustrates one of the drawbacks of blindly using a canned library. Your ...
Olin Lathrop's user avatar
5 votes

STM32L0 Low power UART-receiver reads the wrong data at high baudrate after MCU waking up

Wakeup from Stop mode using LPUART The LPUART is able to wake up the MCU from Stop modewhen the UESM bit is set and the LPUART clock is set to HSI or LSE (refer to the Reset and clock control (...
jms's user avatar
  • 8,611
5 votes
Accepted

UART baud rate error tolerance

I would rather that the "baud rate clock" drifts from the center of the bit towards the end of the bit. That's fine when looking at the receiver, but keep in mind that UART communications is usually ...
Dave Tweed's user avatar
  • 172k
5 votes
Accepted

Baud rate for Square Wave data signal via UART if frequency is given

Hint: did you remember that data is transmitted LSB first? simulate this circuit – Schematic created using CircuitLab Figure 1. 9600 Hz squarewave. From the comments: In base 16, 1010 is A ...
Transistor's user avatar
  • 175k
5 votes
Accepted

ATSAMC21 - CAN configuration - Nominal bit timing vs. data bit timing & time quanta calculation

This is far from trivial to do for this part, took me quite a while and then I'm something of a veteran when it comes to writing CAN drivers. Turns out that you have to be in order to use CAN on SAM ...
Lundin's user avatar
  • 19.9k
5 votes
Accepted

ADXL345 Accelerometer data rate vs bandwidth

I think that this is connected to the 'Nyquist–Shannon sampling theorem', which says that for sampling frequency fs, only signals with frequencies lower than fs/2 can be converted without the loss (or ...
klokaj's user avatar
  • 121
5 votes

Serial communication baud rate issue

I am a bit confused regarding the baud rate of serial communication. Your confusion appears to be about the basic clock synchronisation, not the baud rate. so it takes the data a bit ahead from the ...
jonathanjo's user avatar
  • 13.9k
4 votes
Accepted

Can I connect a CAN node with 250 kbit/s to a CAN bus running at 500 kbit/s?

Basic CAN protocol doesn't support nodes running at different bitrates: The speed of CAN may be different in different systems. However, in a given system the bitrate is uniform and fixed. The ...
Dmitry Grigoryev's user avatar
4 votes

Baud rate vs. Bit rate

While communications is digital, baud rate is equal to bit rate. Only when the communications is modulated to analog can 1 baud encode more than 1 bit as per the constellation diagram. For buses ...
Ignacio Vazquez-Abrams's user avatar
4 votes
Accepted

Why is the CAN bus always busy (microcontroller)?

There are usually two causes of this: The bus terminators are not installed. The 120 Ω terminators at each end of the bus perform two functions: Absorb the energy that would otherwise be ...
Olin Lathrop's user avatar
4 votes

How to demonstrate the effect of baudrate in serial communication

The answer is pretty obvious - baud rates define data transmission speed. If you are using AT commands and typing them by hand, you won't see any difference, because the bottleneck is you. If you are ...
stiebrs's user avatar
  • 809
4 votes
Accepted

How to demonstrate the effect of baudrate in serial communication

The baudrate determines the data rate on transmissions. If you need a certain speed you can estimate the minimum baudrate needed. Whether data is lost or "just" delayed depends on the operational ...
the busybee's user avatar
  • 2,869
4 votes
Accepted

Why would you right shift 8 bits for 8 bit register?

This is a generic method. The ubrr is an unsigned int which makes it 16 bits wide (2 bytes). To break this into discrete bytes like in the example, you need to shift the bits right by 8 to get the ...
evildemonic's user avatar
  • 9,184
4 votes
Accepted

PIC18F4550 Asynchronous USART Baud Rate

Here is the error: TXSTA = 0x20; You didn't set the BRGH bit but are working with this formula: Baudrate = Fosc/[16*(n+1)] Switch to: ...
Mike's user avatar
  • 2,156
4 votes

Serial communication baud rate issue

No, it is genrally not possible to lose data under normal conditions, as the receiver actually runs faster than at the bit rate to be able to receive bits properly at the bit rate For 10-bit frames, i....
Justme's user avatar
  • 143k

Only top scored, non community-wiki answers of a minimum length are eligible