Serial and parallel data transmission. Data transfer in encoder as example

Data transmission definition consists in sending and receiving of data from the signal source (Sensor, encoder) to the receiver (microcontroller, PLC).

  1. How does data transfer work? An example of encoders
  2. What is parallel data transmission?
  3. What is serial data transmission?
  4. Asynchronous data transmission working principle
  5. Synchronous data transmission

How does data transfer work? An example of encoders

At first, let's find out: where does the data in the encoder come from? Encoders measure the angle of rotation of the offset of its own shaft (rotary) or its scale (linear). These values ​​in the form of code are sent to the controllers. For such purpose, simple binary or gray code is used.

OK, we have already received information, so how can it get into the controllers? There are two main ways to transfer such data:

  • Serial
  • Parallel

Let`s look at the principle of their work by transmitting 1 byte (8 bits) of information.

What is parallel data transmission?

In parallel data transmission, each bit is transmitted on a separate line (wire, cable or channel). That is, to transfer 1 byte of information (8 bits), 8 lines are required, single for each one. The simple scheme of this operation is looked like 1 byte = 8 bit = 8 lines (wires) = 1 cycle.

Parallel data transmission image

Parallel method advantages and disadvantages

The main advantage of this method is the ability to transmit each bit at the same time. Hence, a fast transfer of large amounts of information is performed in a one-time cycle. This method significantly saves time on sending and receiving a signal, which makes it the fastest.

The main disadvantage of such approach is the need to provide numerous wires for each output channel. That is, the higher the resolution of encoder, the more wiring will be required. For example, if the sensor resolution is 25 bits, then 25 wires will be needed. Also, pulses on the channels can travel at different speeds. It depends on each cable's characteristics and can significantly influence results at long distances.

To avoid using dozens of wires while working with very accurate sensors, serial transmission is commonly used.

What is serial data transmission?

This method of data transfer sends all signals in just a single line, bit by bit, one after another. It is a very reliable method, as new signals don't be sent until the previous ones are received. Pulse of a 1 byte is transmitted in a block of 8 bits from sender to destination.

There are two types of serial data transmission:

  • Asynchronous
  • Synchronous

The main and the most important difference between both types is presence of so-called start and stop bits. Presented method is very popular for transmitting information over long distances.

Asynchronous data transmission working principle

During asynchronous data transfer, the signal is transmitted in one line bit by bit. In order for the controller to understand when to start receiving a new data packet, special start and stop bits are used.

Let's look at what the transmitted byte of information looks like. Sending the block begins with a start bit (0). This is followed by the actual information (our 8 bits). After that, the block ends with a stop bit (1). That last bit helps the receiver to understand that it has received a completed data block. Between the first and the following blocks, there is a gap (so-called idle time). Then the next data packet is coming, which starts with the start bit (0) and ends with the stop bit (1) and so on.

Serial asynchronous data transfer scheme

Advantages and disadvantages of asynchronous method

The main feature of the asynchronous method is the ability to work with different time periods. For example, if the sender and receiver have a different clock frequency, then the data will arrive at different intervals. This approach makes it possible not to attach to the timing and synchronization of the devices.

The main disadvantage of this principle is the slower speed. However, this is the most cost-effective method when the speed is not so necessary.

Synchronous data transmission

In the synchronous method, all data is transmitted continuously. That is, there is no need to use start and stop bits and there are no gaps between blocks. Both the receiver and the source operates at the same clock frequency. Blocks of bits are transmitted one by one sequentially. After the controller has received 8 bits (our one-byte stack), it groups them and finishes receiving the block, immediately followed by another without interruption.

Serial synchronous data transmission image

Advantages and disadvantages of synchronous method

This is the fastest serial data transfer method. It quickly transfers an endless stream of data using a single channel.

The disadvantage of this method is the relatively high cost of such equipment. The encoder and controller must operate at the same clock frequency. Timing plays an important role in such systems. Its final accuracy of the results depends on it.

On our website, you can find eltra encoders with various interfaces. Due to the large assortment, all clients will always be able to choose something suitable. Call now or send a requirement!




No comments yet

Write your comment

Name*
Email
Enter your comment*
19 + ? = 29
Enter Captcha*