Questions tagged [uart]

A UART is a Universal Asynchronous Receiver/Transmitter. This refers to the "hardware" serial port in the processor. Use this tag for questions about hardware serial.

Most Arduinos have one or more UART ports. The smaller Arduinos (such as the Uno) have one UART port. Larger Arduinos (such as the Mega2560) have multiple UART ports.

The UART takes a serial stream of bits and assembles it into a byte, effectively turning serial data into parallel data (and vice-versa for sending). Generally speaking the Arduino UARTs are used for implementing the HardwareSerial class, of which an instance called Serial (and possibly Serial1, Serial2, etc.) is available on many boards.

The UART has a send and receive buffer, so it can be sending and receiving simultaneously, while the main program code can be doing something else.

The UART can generate interrupts if desired, for events like:

  • Transmit buffer empty (so more data can be sent)
  • Receive buffer filled (so the last-received byte can be retrieved)

Some of the smaller chips (such as the ATtiny85) have a USI (Universal Serial Interface) instead of a UART.

Related tags:

Also see UART: Wikipedia

245 questions
2
votes
2 answers

UART Software Serial - Syncing two sensors to make a tx and rx beacon

Problem I've been trying to a create a receiver and transmitter beacon for a following robot, but have not been able to sync my two SRF02s to one another. Any advice? Code #include SoftwareSerial mySerial(10,11); // RX, TX…
Umbus
  • 143
  • 6
2
votes
0 answers

Synchronizing two sensors on uart, make one receiver and one transmitter

I need to make a transmitter and receiver with each specifically transmitting and receiving a signal. I am using two SRF-02 sensors, one is the designated transmitter, the other the receiver. My issue is that the receiver is not currently able to…
Umbus
  • 143
  • 6
2
votes
3 answers

UART Software Serial - Syncing two different sensors with start and stop bytes

I'm using 2 SRF02 sensors on the same Arduino board to attempt to have the transmitter only pulse the 40 KHz wave, while the receiver will be only taking a fake range, i.e. picking up a reading based on another transmission. I've been using…
Umbus
  • 143
  • 6
1
vote
2 answers

Serial communication with 2 Arduinos and one optocoupler

I just started working with Arduinos on Tinkercad in a school assignment and have non preexisting electrical knowledge. Tried to read up on the subject and I think I've gotten some of the facts straight but i still can't get them to communicate when…
Funtad
  • 11
  • 2
1
vote
1 answer

Communication between Genuino Zero and Arduino Uno using UART

I want to make my Arduino Uno and Genuino Zero communicate using UART. My Genuino Zero is the transmitter and the receiver is the Arduino Uno. For the Arduino Uno, I am using the SoftSerial library. I have uploaded the transmitter and receiver…
Beginner
  • 43
  • 2
  • 9
1
vote
0 answers

Can't get my code to my OLED

I´m using Spark Fun Micro Pro board 5V: https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/hardware-overview-pro-micro and to that i´ve hooked a true color OLED from digole: http://www.digole.com/index.php?productID=859 Got a wire…
MrHaze
  • 81
  • 7
0
votes
1 answer

atmega328: external crystal oscillator and uart

I need an clearity about external crystal oscilator. I got communication between esp32 and atmega8/88/328 processor, I use atmega wih internal oscillator and looks like it have problem with serial communication (some time it lose data, or replace it…
0
votes
2 answers

Wait between UART frames

I have to reproduce a signal (of 6 UART frames) which have 950 µs delay between each of the frames. Than, a delay of 37ms at the end of those frames. Everything going right except the delay between each frame...The baud rate is at 9600. Here is my…
Balobiana
  • 19
  • 2
0
votes
1 answer

Baud rate of Arduinos bootloader

I am learning UART and the problem that i have is understanding what happens when i send serial data to my PC via USB which is built in to the Arduino uno board. For incoming serial data i am using Terminal v1.9b and it basically lets me to set…
Anton Stafeyev
  • 103
  • 1
  • 2
0
votes
2 answers

How to read the serial data from a ATMEGA8 on a PC using Arduino?

I want to check if a device is working or not. It is a custom made PCB with a Atmega8. It was given to me along with the AVR code. How do I read the data that it sends on my laptop using a arduino, preferably a Arduino Uno? I tried connecting the…
daltonfury42
  • 165
  • 1
  • 2
  • 7