Questions tagged [uart]

A UART (Universal Asynchronous Receiver Transmitter) is a piece of logic that sends and receives data on a serial port.

A UART is often used with communication standards like RS-232, RS-422, or RS-485. Usually 8 data bits are sent, but other word lengths are used too (5 to 9). A UART usually contains a clock generator, input and output shift registers, and transmit/receive and read/write control logic.

Further reading:

1552 questions
121
votes
5 answers

Difference between UART and RS-232?

Most of the time RS-232 and UART come together in serial communication theories. Are they both the same? From my readings I concluded UART is a hardware form of the RS-232 protocol. Am I correct?
tollin jose
  • 3,092
  • 9
  • 35
  • 53
58
votes
7 answers

What standard UART rates are there?

I know 9600, 19200, 38400, 57600, 115200 and 1.8432 Mbaud, but no others. Why are these values used, and is it simply doubling each time or is there something more complex going on (for example, 38400 quadrupled is not 115200 baud?) The reason I…
Thomas O
  • 31,546
  • 57
  • 182
  • 320
38
votes
13 answers

Software to create timing diagrams

In my professional life, I sometimes need to create timing diagrams for protocols: UART, SPI, etc. However, I can't find any good programs available. What programs can be recommended for this and what is the experience using them?
Seidleroni
  • 1,674
  • 2
  • 14
  • 19
29
votes
8 answers

When should one switch from ASCII to advanced serial protocols?

All my microcontroller devices that communicate with the PC via UART use ASCII strings for sending commands and receiving data (as implemented in Arduino). That's what I learned when I began digging into electronics and I always found sending bare…
26
votes
3 answers

UART & USART - What's the difference

In the office I hear these terms thrown around as if they are the same. My understanding is that USARTs can deliver the clock signal along with the data. Are there any other differences? What are the advantages and disadvantages of each?
waffleman
  • 361
  • 1
  • 3
  • 4
26
votes
2 answers

Pull up resistors on UART

I was going through an app-note AN2606 where I came across this connection diagram: As per my knowledge, UART is push-pull type and Tx provides the pull-up required and hence we don't need to use any external pull ups. Am I missing something here?
Whiskeyjack
  • 7,946
  • 8
  • 53
  • 91
24
votes
3 answers

UART signal is "rounded"

I am trying to debug a UART driver for the STM32F405. It does not work above a certain baud rate (about 50 kBd). I connected it to a logic analyzer with analog capability, and I saw that the signal is rounded; it takes time for the signal to rise.…
BillThePlatypus
  • 351
  • 2
  • 7
23
votes
2 answers

How does an FTDI chip work?

Someone asked me the other day how an FTDI USB to serial UART works, and I realized I didn't know. I looked at the datasheet for the FT232R and the block diagram didn't really help me. Can anyone explain or link me to a good explanation?
aloishis89
  • 1,660
  • 3
  • 13
  • 20
22
votes
2 answers

Maximum cable length for 3.3V UART signals

I would like to avoid using RS-232 converters between two microcontrollers on two different boards. For various reasons, only UARTs are supported, e.g. no SPI or I2C, and I will be using CAT5E cable to RJ45 jacks between the boards. The data rate…
QuestionMan
  • 1,145
  • 2
  • 10
  • 19
22
votes
11 answers

Injecting a communication signal over DC power supply lines

I'd like to be able to daisy chain multiple devices using just the power supply wires and then inject a communications signal over the power lines to turn it into a half duplex network. Are there any common methods of achieving this? The simpler the…
Peter Gibson
  • 1,800
  • 1
  • 12
  • 14
20
votes
7 answers

One or two UART stop bits?

UARTs often let you choose between 1, 1.5 and 2 stop bits. With 1 stop bit payload efficiency is 80% (8/10), with 2 stop bits that drops to 72.7% (8/11). So what's the advantage of the second stop bit?
Federico Russo
  • 9,658
  • 17
  • 68
  • 117
20
votes
2 answers

Why are two transistors often used instead of one?

Many circuit designs I see with transistors use two transistors chained together instead of just using one transistor. Case in point: This circuit is designed to allow a device with a 3.3V UART to communicate with a 5V microcontroller. I understand…
Nate
  • 4,496
  • 11
  • 56
  • 75
17
votes
4 answers

How critical are UART frequencies?

I'm going to be using an 8 MHz crystal to run my microcontroller at 16 MIPS (PLL 4x, 2 cycle instructions.) However, 8 MHz doesn't divide into any UART frequencies AFAIK... so how critical are these frequencies? I plan to use 115,200 baud. Can UART…
Thomas O
  • 31,546
  • 57
  • 182
  • 320
16
votes
1 answer

Would it be considered good practice to match the lengths of UART's Tx/Rx traces?

I am assuming the answer would be yes since Tx/Rx pins are used to send data back and forth, or is it of such a low frequency that such thing is not required?
Alex
  • 552
  • 4
  • 15
15
votes
3 answers

How do two UARTS know which baud rate to use?

I am reading about the standard protocol for UART and I think that if the receiving UART does not have any idea on what baud rate the data was transmitted, there would be lots of problems. If the assumed baud rate is lower than the baud rate in…
Batibot323
  • 171
  • 1
  • 7
1
2 3
99 100