Questions tagged [serial-communication]

Serial communication is the process of sending and receiving data via communication channel bit by bit sequentially, one bit at a time.

Serial communication is used for all long-haul communication and most computer networks, where the cost of cable and synchronization difficulties make parallel communication impractical.

Main advantages of serial communications:

  • fewer interconnecting cables (e.g. wires/fibers) and hence occupies less space. The extra space allows for better isolation of the channel from its surroundings;
  • less crosstalk, because there are fewer conductors in proximity.

Data sent serially this way. When 8-bit data set D0..D7 is transferred into the output buffer to be transmitted, usually it is still in parallel form. This output buffer converts this data into Serial data (PISO) (Parallel In Serial Out), MSB (Most Significant Bit) first or LSB (Least Significant Bit) first as according to the protocol. And than data is transmitted in Serial mode via communication channel (cable, radio etc.). When this data is received by recipient in its receiver buffer, the receiver buffer converts it back into parallel data (SIPO) (Serial In Parallel Out) for further processing:

Serial transfer

Generally, all serial protocols can be divided into two groups: synchronous and asynchronous.

A synchronous serial communication is always coupled with a CLOCK signal, so that all devices on the serial bus share a common clock. This particular configuration allows a simpler and often faster data transfer, but also requires an additional channel to communicate. I²C and SPI are two synchronous serial communication protocols.

An asynchronous serial communication, on the other hand, does not use an external CLOCK signal and therefore requires less I/O channels for communication. At the expense of this, a reliable system for transmitting and receiving data must be implemented. The most common serial protocols are Bluetooth, Xbee, GPS module.

More information:

https://en.wikipedia.org/wiki/Serial_communication

Asynchronous serial communication

Universal asynchronous receiver-transmitter

Synchronous serial communication

Universal synchronous and asynchronous receiver-transmitter

RS-232

Inter-Integrated Circuit (I²C)

Serial Peripheral Interface (SPI)

920 questions
-1
votes
1 answer

How to send/write serial command to Honeywell 1300g scanner on virtual com port?

I've been trying to interface with a scanner connected via USB on a virtual com port in order to trigger it with a serial command. I am restricted to using Powershell due to the nature of the environment (work computer, no access to other…
-1
votes
1 answer

Problem with Serial communication RXTX and Arduino

I am having this problem below: https://drive.google.com/file/d/1F1joXc9xppFWRRqxWaaC7izRNaSnVaYc/view?usp=sharing I already searched this problem here and in other foruns, and it seems to be a quite frequent problem, although I still cannot solve…
-1
votes
1 answer

what is the best way to synchronize the serial communication between two microcontrollers using UART?

Suppose we have two microcontrollers , UART module was initialized to work as a Transmitter and Receiver ( full doublex communication ) for both of them. Before the super loope one of them send a certain byte , and in the super loop some times the…
-1
votes
1 answer

Unexpected behavior during serial communication on device

" I am wrting program which write data on com port serial communication syncronous operation and read operation is also synchronous when put sleep after writefile it work fine but if remove sleep then i get some wrong data which 0x20 space not all…
-1
votes
1 answer

NullReferenceException Serial Communication Recieve Data C#

I need help. I my form to receive data from my Arduino through Serial Communication. But when I try to read data, I always get NullReferenceException. My system is a simple counter. Before the number in the screen gets incremented, it needs to see…
Dan
  • 3
  • 1
-1
votes
1 answer

Remove function doesn't work with multiple instances in multiple loops after serial communication

I created a simple echoing program to receive data, modify it and then have it echo back the modified and original data. When I run my code, I'm not getting what I'm expecting. I created a windows form to communicate with the Ardino UNO. I'll send…
j.yang29
  • 65
  • 9
-1
votes
2 answers

Segmentation core error c

I am little bit ruggy with C coding, but I need this script working to test serial communication with a microcontroller. I have the following code written as: int main() { char *portname = "/dev/ttyACM0"; FILE *csv = fopen("~/Desktop/my.csv",…
-1
votes
1 answer

What is the C++ equivalent to this MATLAB code?

In my project, I am responsible for migrating some MATLAB code to C++. The code below refers to serial communication from a computer to a microcontroller. The function CreatePackage generates a package which is then sent to the microcontroller…
ihavenoidea
  • 629
  • 1
  • 7
  • 26
-1
votes
1 answer

Putty Default Serial Configuration

When using C# I can only read the last 4 characters of the value in COM2. Putty reads it correctly I have no control or information over the source that is putting the value on COM2. My C# settings resemble the basic settings on Putty configuration…
The One
  • 4,560
  • 5
  • 36
  • 52
-1
votes
1 answer

Cross talk with Serial communication.

So i have a lib object that I am using for a base serial communication object. In the other c++ application I create to instances of that object. One connect to com 4 and the other to com 6. When sending data to two different devices. I am seeing…
-1
votes
1 answer

how to connect arduino and usb camera with xiaomi nano router (openwrt)?

I want to develop a similar project based on this project, but i want to use xiaomi nano router instead of TP-WR703n router. The problem is that my router does not have an USB port to communicate with other devices (arduino mega and camera). My…
user3684195
  • 27
  • 1
  • 5
-1
votes
1 answer

Arduino Serial Communication from Java

I can't serial the port JAVA to Arduino .. I Get this error Load RxTx Windows 10 java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "main"…
Ahmad Akanci
  • 33
  • 1
  • 1
  • 5
-1
votes
1 answer

How to display text in a box based on serial port existing data

I have a serial com GUI and I need to have text displayed in a box based on what the serial port's existing data is, but not exactly what the serial port data is. For example, if the serial port's existing line is "!+0007.", I would like my textbox…
-1
votes
1 answer

Arduino Serial.parseInt() data read corrupted by too much Serial.print()?

I am doing an Arduino project to have a fan spin based on the vehicle speed in iRacing. This is my very first arduino project, so please bear with me. I'm really confused by some strange behavior with the PC/Arduino serial communication and I'm…
-1
votes
1 answer

serial communication beteen arduino and MATLAB

I'm currently working on my final year study project , i'm using arduino due and the ultrasonic sensors which are placed on a wheelchair to make an autonomous one. so my problem is that i'm reading the distances from the sensors and i need to send…