Go Down

Topic: A question about the baudrate in Arduino (Read 525 times) previous topic - next topic

cmd1024

I know what baud rate(bps) means in general. But as far as I understood the baudrate we configure using Arduino programming is a bit different or confusing.

Does the baud rate in Arduino represent the data speed between the computer and the USB-UART chip (FTDI)? I read in some forums that it is not.

What does the baudrate in Arduino really mean?

SirNickity

It's the clock period between samples of the serial line.  In other words, once every (1 sec / baud), sample the voltage on the serial pin as either 1 or 0.

I think you may be getting mixed up with PC communications, where there's a serial link between the PC and a modem, and the modem and the far-end modem.  The UART-to-modem serial link will be at one rate while the modem-to-modem link could be at another rate.

This isn't the case with the Arduino.  There's only one serial link, and thus only one baud rate.

silasmoeckel

Ok you have two places to set this up for your serial monitor and in your sketch.  They need to agree as it's effectively a sampling rate  and since there it's no clock line to sync things it needs to be hard coded on each end.  This only exists between the serial pins on the atmega and the usb to ttl serial adapter (FTDI an ATiny or a slew of other options) past that it's gets packaged into USB land and goes probably 1.5 or 12mbs.  Now when your uploading it can require a different baud rate since it's hard coded into the boot loader what to expect.

Go Up