12

When we initialize a serial communication, we usually have to set the baud rate (e.g. 115200) I notice that many people assume that 115200 means 115200 bits per second. However, each baud(signal change) can encode more than 1 bit. baud 115200 means 115200 bits per second only if each baud = 1 bit. If each baud is 5 bits, then having baud 115200 means a bit rate of 115200 * 5 bits per seconds.

If what I said above is true, what is the baud to bit ratio for UART and USB3.0 assuming the baud rate is set to 115200?

It cannot be 1 to 1 because 115200 bits per seconds is 14.0625 KBps (kilo byte per second), which is too slow.

wovano
  • 161
  • 2
  • 11
Weidong Guo
  • 123
  • 1
  • 1
  • 5

4 Answers4

18

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 5 bits, then having baud 115200 means a bit rate of 115200 * 5 bits per seconds.

is correct in spirit, but you should replace the word "baud" with "symbol". If you have an alphabet of 32 symbols, then each symbol encodes 5 bits, and a signalling rate of 115200 symbols per second, which is 115200 Baud (by definition), will give you 115200 * 5 = 576000 bits per second.

The commonly used phrase "Baud rate" is grammatically incorrect in essentially the same way that "ATM machine" is incorrect. The definition of Baud has the concept of rate built into it, so saying "Baud rate" is grammatically the same as saying "symbol rate rate" (which might make sense if you're talking about a changing symbol rate, but that's not how most people use it). Likewise, "ATM" has "machine" already incorporated into it, so "ATM machine" is equivalent to saying "automated teller machine machine" (which, again, could make sense if you were talking about a machine that produces ATMs, but that's usually not what people mean).

Grammar aside, most low-to-moderate speed short-range signaling over wire uses binary signalling, so the symbol rate equals the bit rate. Long range signalling over wire (e.g., cable modems) and via radio is more likely to use multi-bit symbols, and hence the bit rate will be higher than the symbol rate.

user98732
  • 655
  • 4
  • 7
  • 3
    Sorry, but I downvoted because you are wrong. "Symbol" in this case does not mean what you think it means. Typically in binary transmission there are only two symbols, mark and space. An alphabet with 32 characters does require 5 bits, but each bit requires the transmission of a symbol. So your example of a 115k baud signaling rate only transmits 115k bits per second. See https://en.wikipedia.org/wiki/Baud for more info. – WhatRoughBeast Jan 30 '16 at 15:24
  • 4
    @WhatRoughBeast Only if you have 0 and 1 as symbols. Entropivore is talking about 32 levels of voltage. https://en.wikipedia.org/wiki/Pulse-amplitude_modulation In that case, you get 5 bits with one signal because it's encoded in the amplitude of one symbol. – horta Jan 30 '16 at 19:30
  • 8
    @WhatRoughBeast, I think you are perhaps confused by the term "alphabet". In comms terms, "alphabet" means the set of symbols that can be communicated over the channel. If there are only two distinguishable states of the channel, then you have an alphabet consisting of two symbols. If there are, as in our previous example, 32 states, then you have an alphabet of 32 symbols. These can be represented in many ways, including amplitude and phase of a sinusoidal carrier, pulse amplitude, width, or position, etc., etc. If you choose to represent these symbols as a binary word, it takes 5 bits. – user98732 Jan 30 '16 at 23:36
  • 1
    Sorry, that last sentence is badly worded. I should have said, "If you choose to represent *one* of these symbols as a binary word." – user98732 Jan 31 '16 at 23:39
  • @WhatRoughBeast Do you consider compression, where e.g. some 32 symbols might be presented by 1 to 3 bits of a stream? – Sam Ginrich Aug 14 '23 at 15:28
4

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 transmitting data that are faster than the bit rate of the serial connection, the transmission is performed in bursts. USB 3.0 can send up to 1024 data bytes per bulk transfer, which means that a full packet would be sent on average every 1.6384us assuming a 5Gbps bus speed.

Ignacio Vazquez-Abrams
  • 48,282
  • 4
  • 73
  • 102
  • Is your 1st paragraph true for buses that use parallel channels? – jippie Jan 30 '16 at 11:02
  • Let me make my question simple. What does it mean if I set the baud rate for uart to be 115200? Does it imply that the maximum data rate is 115200 bps. If it can be more, why? – Weidong Guo Jan 30 '16 at 11:04
  • @jippie: I suppose technically it isn't, but essentially no one refers to "baud" when talking about a parallel channel. – Ignacio Vazquez-Abrams Jan 30 '16 at 11:05
  • @WeidongGuo: It implies that somewhere along the line there is a device that will send bits with at least approximately 8.7us spacing between each bit, and another that can receive bits with no less than the same period. – Ignacio Vazquez-Abrams Jan 30 '16 at 11:08
  • @IgnacioVazquez-Abrams: I understand how you do 1/115200 = 8.7us for each signal change. But this is not what I am looking for. You mentioned in your answer that you can send in burst. Burst only implies using less overhead(control bits) for more data (payload) transfer. What I am looking at is the bit rate (both control bits and payload), not just the payload. When I talk about baud, I simply mean how fast signal change. 115200 bits per seconds is 14.0625 KBps is too slow. There must be something that make it fast like a bit rate of Mega bytes – Weidong Guo Jan 30 '16 at 11:20
  • At least? Do you mean approximately 8.7us, within baud rate error limits, since a period significantly higher that that would be as problematic as one significantly less? – SoreDakeNoKoto Jan 30 '16 at 11:23
  • @TisteAndii: Yes, I should have said "approximately". – Ignacio Vazquez-Abrams Jan 30 '16 at 11:36
  • 1
    @WeidongGuo: There isn't. Which is why USB latency can be an issue for certain applications. – Ignacio Vazquez-Abrams Jan 30 '16 at 11:37
2

You are comparing the rates at different layers in a abstraction model. In your example USB3.0 is merely used pretty much like a tunnel to send "115200 bps UART" through. It doesn't matter how USB3.0 does that, the voltages may differ, the frames may differ, the speed may differ. (They all will BTW).

jippie
  • 33,033
  • 16
  • 93
  • 160
2

Bit rate and baud rate are the same for UART, as others said. It is not the same for all baseband signaling methods (others called them digital, which is not necesarilly correct). Take Manchester line code for example, there the bit is encoded as raising or failing edge.

The way you computed bit rate is not correct, though. UART uses word synchronization, meaning it sends whole bytes at once encapsulated in frames of at least 9 bits. The start bit is added for phase synchronization of clocks between receiver and transmitter.

This is also why it makes no sense to refer to bit rates in case of UART - its either byte rate, or baud rate.

student
  • 541
  • 3
  • 12
  • According to this page, https://en.wikipedia.org/wiki/List_of_device_bit_rates, Serial 16550 UART max has bit rate of 1.5 Mbit/s, then it means each symbol(signal change) is encoded in (1.5M / 115200 = 13 bits), assuming 115220 Baud. Am I right? – Weidong Guo Jan 30 '16 at 20:53
  • Nope, 1.5Mbit is maximum throughput achievable with UART, given its line code and signaling method. It has nothing to do with 115,2kB, that is just another speed. – student Jan 30 '16 at 21:24
  • then let me make up a number then, if the average speed is 1.5Mbit/s for UART, is what I said above true then. – Weidong Guo Jan 30 '16 at 21:26
  • Nope, if you have throughput 1.5Mbit/s it means you have roughly 187 kB/s, which translates to baud rate at least 1.65MBd. This is the case when each byte is encoded using start bit and the 8 bits of the byte, without stop and parity bits (those are optional). As I said above, bits and bauds are 1:1 in UART, but, there is difference between the bits you transmitted and bits of the data since each byte is encapsulated in its own frame. – student Jan 30 '16 at 21:36
  • i only care about the bits transmitted not just the data(payload). "Baud rates can be just about any value within reason. The only requirement is that both devices operate at the same rate". So, baud is protocol-dependent, or hardware dependent, or both? – Weidong Guo Jan 30 '16 at 22:29
  • You need to differentiate between line codes (how the bits are encoded) and protocol (how the data are organized). Baud rate is maximum number of state changes per second. So yes, baud rate is protocol independent, but it does depend on used line code. In case of UART, you have 1:1 relation between baud rate and maximum number of bits physically transmitted. It is then due to the protocol overhead that actual number of data bits is smaller than number of transmitted bits. – student Jan 30 '16 at 22:39
  • Also, you seem confused about what is baud rate. You do not transmit bauds, it is just a number that gives upper limit on state changes per second. Bits are by definition binary digits, they carry information. – student Jan 30 '16 at 22:40
  • Isn't UART a protocol, a way to organize data? And now you are saying Baud rate is protocol-independent but UART, as a protocol, also impose on how bits are encoded? In other words, are you saying that UART can be a piece of hardware. This piece of hardware dictates how bits are encoded. And to organize data for this piece of hardware, we have a protocol also named UART ? – Weidong Guo Jan 30 '16 at 23:16
  • @WeidongGuo, A UART *is* a piece of hardware. The name is an acronym of *Universal Asynchronous Receiver/Transmitter*. It used to be that these were in the form of an individual integrated circuit, such as the 8250 and 16550 parts from National Semiconductor. Nowdays this function is typically a small part of a much larger IC such as a microcontroller. The protocol that these parts implement is usually referred to as *asynchronous serial* communication. Calling the protocol "UART" is just a common bit of sloppiness that should be avoided because it leads to just this sort of confusion. – user98732 Jan 31 '16 at 00:16
  • @Entropivore: So UART(piece of hardware) specifies the number of bits per symbol(signal change). The protocol of UART, Asynchronous Serial Communication, organize how the data is transfered, how many control bits (start bits) and stuff like that. Am I right? – Weidong Guo Jan 31 '16 at 00:28
  • @WeidongGuo as Entropivore said, UART is a piece of hardware, this hardware dictates the line code and the protocol. It is a complete specification of how data are transferred from transmitter to the receiver, how they are synchronized without the clock (hence, its asynchronous) and how the data are secured (parity). Maybe reading about UART on Wikipedia would help you.. – student Jan 31 '16 at 00:33
  • In the above discussion, the 1.5Mbit/sec is just the maximum speed that that particular device is capable of being clocked at. There's nothing inherent in the asynchronous serial signalling method that limits the speed. There are various reasons why it's not the best choice for higher speed links, but there's no fundamental limit. – user98732 Jan 31 '16 at 00:38
  • Yes, but it should be said that the 1.5Mbit/sec is fairly close to limit on longer transmission lines if RS232 is used. This is due to the word instead of bit synchronization and high sensibility to noise. Higher the clock lower is the energy of individual bits and more difficult it gets to sample them at the receiver side. Also, you have relatively high voltage swings on RS232, which pronounces more the parasitic capacitance of the cabling. – student Jan 31 '16 at 01:01
  • @student, you're right, I don't think I'd want to run RS232 even that fast in most circumstances, and in fact the classic MC1488/MC1489 driver/receiver pair didn't go anywhere near this speed. However, you can run async serial data over anything, including straight TTL/CMOS logic levels, RS422 (differential, spec'd up to 10Mbps), RS485, etc., even LVDS if you want to. This shows why it's important to understand the distinction between the physical medium and the higher protocol layers. – user98732 Jan 31 '16 at 02:53