Topics
Data Transmission Protocols

Data Transmission Protocols

Data transmission can be categorized into two forms:

  • Between two or more computing devices over a computer network over a wired or a wireless connection.
  • Between the computing device and connected components, such as from a processor to a peripheral, or between two microcontrollers through direct connection.

The first form of data transmission happens over networks using communication protocols such as WiFi which we have read about in the topics on Networking. The second form of data transmission between directly connected components and microcontrollers uses a different set of protocols which we will cover here.

Every solution needs data to be transmitted between microcontrollers and connected components and between multiple microcontrollers. Data is transmitted in a digital bitstream (a sequence of bits). Digital data can be transmitted without any conversion, but analog data (or analog signals) must be converted to a digital bitstream first. Analog data includes voice and other audio or video information that is a continuous signal, which varies in amplitude, phase, or other properties.

Analog data needs to be digitized for transmission and then converted back to analog data at the receiving device only if it has to be sent to an analog output device (such as an audio speaker). This conversion is carried out using analog-to-digital conversion and data compression mechanisms, such as pulse-code modulation (PCM). It often requires specific components or devices known as codec (an abbreviated version of code-decode) devices.

Data Tranmission

When designing or building circuits using microcontrollers, such as Arduino boards, it is important to know these protocols. Each sensor, controller, or any other component may have a different data transmission protocol. They will have to be connected to the board accordingly, and the instructions will also have to be programmed depending on the protocol being used.

The three most common protocols are:

  • Serial Peripheral Interface (SPI)
  • Universal Asynchronous Receiver/Transmitter (UART)
  • Inter-Integrated Circuit (I2C)

All three are quite a bit slower than protocols like Ethernet, WiFi, and Bluetooth. However, they are a lot simpler and use less hardware and system resources, thus ideal for communication between microcontrollers and between microcontrollers and sensors where only very small volumes of data need to be transferred.

Microcontroller boards are connected to your computer to upload programs to them and to send and receive data to and from the microcontrollers. This data exchanges happens using UART. All other sensors and module may use any of the three protocols listed above. You have to check the specifications and the pinout diagrams and make the connections and code accordingly.