0

I have a transmitter(simple 433 MHz transmitter) connected via digital pins on the Arduino. The receiver is connected to another arduino. Now, I kept that pin on HIGH for 1 second, and it transmits only 1000 ones. But I've seen different example transmitter sketches having baud rates of 1200, 9600, etc. So the situation is, when the transmitter is transmitting at maximum capacity(just HIGH for a whole second), it can only transmit 1000 ones.

I am able to read that it only transmits 1000 ones because my receiver just has a simple read function that reads and prints the data. and it prints 1000 ones every second. Give or take one or two. So when you specify a baud rate of 1200, is it useless? how will it transmit 1200 bits/sec? Does the baud rate actually increase the hardware limit or what exactly is going on? Can someone please provide me some insight into this? I'd be glad to clarify this question more if need be.

Jonathan
  • 264
  • 3
  • 15

1 Answers1

1

The transmitter you're using is very basic, and only transmits "on" and "off". As such it is protocol-agnostic. In order to use it effectively we use it with a protocol that uses "on" and "off" as its signalling, but also includes framing information so that we can know when the data flow starts and stops.

One such protocol is the UART protocol consisting of 1 start bit, 5 to 9 data bits, an even, odd, or no parity bit, and 1, 1.5, or 2 stop bits, all being generated at a specific rate. This rate is the "baud rate", and must match in both the sending device's and the receiving device's UART in order for them to communicate. This is true whether the devices are connected by a wire, an optical link, or a radio link.

The TX and RX pins on an Arduino are connected to a hardware UART which will handle the framing and signal generation for you. The hardware UART(s) can be accessed via Serial on non-USB-native Arduinos as well as Serial1, Serial2, and Serial3 on Arduinos where they are present.

Additionally, SoftwareSerial can be used to generate a UART signal on arbitrary pins in software, but you're almost always better off using a hardware UART when possible.

Ignacio Vazquez-Abrams
  • 17,733
  • 1
  • 28
  • 32