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
-2
votes
1 answer

Does cpu usage affect reading of serial data?

I'm not sure if this is an obvious question, but I am somewhat new to serial communication (at least never thought about it in this depth) and extremely new to Python. I have a Raspberry Pi and a linear actuator. The linear actuator has an API that…
-2
votes
1 answer

How to establish serial communication between ESP8266 and Python

I followed this guide to try and learn serial communication but the code does not seem to work properly. #Arduino Code String InBytes; void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode(4, OUTPUT); } void…
-2
votes
1 answer

Problems working with values from String.split

for my current project i need to communicate with an arduino via USB and i use csv. What do I mean by this? Let me try to explain it. I want to use the Arduino to read sensors. But since I have different sensors, I want to send more than just the…
isi_ko
  • 417
  • 1
  • 5
  • 14
-2
votes
2 answers

Differences between serial communication in matlab vs. python 3.7? Sending int values over 128 via python serial to an arduino

I have some matlab functions which I would like to translate into python 3.7. The functions calculate values for joint angles of a little robot from trossenrobotics and send those values via serial port to the robot which is controlled by an arduino…
-2
votes
1 answer

CAN Bus: Is simulatenous communication possible?

I need to establish a HMI protocol based on CAN, that enables the simultaneous communication of the application Device with the HMI Device? Restriction is that CAN can be realised as a simultaneous bus access, by using CSMA/CA method. it is based on…
qwerty
  • 105
  • 3
-2
votes
3 answers

Send a structure using UART

I have a two boards: - Master board (M board) - Slave board (S board) M board shall send a request to S board and the latter shall answer. The answer of the slave is a struct: typedef struct{ uint8_t userID; uint8_t userPass; uint16_t…
Pryda
  • 899
  • 5
  • 14
  • 37
-2
votes
1 answer

Serial Communication not getting stopped with port.Stop Command

I have been trying to stop serial communication with port.Stop and port.Dispose() but still communication doesn't stop when established once. Here is my Code Start Method to send data continuously till port is open public void Start(List
-2
votes
1 answer

windows serial communication C++

I'm new to c++ and windows serial communication. Now i'm following microsoft link., But there I don't know the meaning of following variables what's those variables do . Please help me to understand what the following variables. Variables i dont…
-2
votes
1 answer

communicationg to device using cdc usb protocol in c# windows application

I need help to create a c# application for usb communication using cdc protocol. My application is communicating to device by using by using usb communication protocol.Can somebody give me a sample application in c# showing sending and receiving of…
-2
votes
1 answer

COM Port Communications Pending Forever with FILE_FLAG_OVERLAPPED on Win32

The ultimate goal here is to get an existing C++ application to communicate over virtual serial COM port with an existing C# application, both of which someone else wrote. I'm not very familiar with serial communications, I've been studying it the…
Steverino
  • 2,099
  • 6
  • 26
  • 50
-2
votes
1 answer

Modbus rtu slave is not responding to modbus rtu master

https://code.google.com/p/stm32modbus/source/browse/#svn%2Ftrunk%2F%20stm32modbus%20--username%20ickingdom%40gmail.com%253Fstate%253Dclosed I am using this program.I debug and compile it successfully no error i got then i burn it into my prototype…
-2
votes
1 answer

How to establish Serial port communication between C# application and a Processing application

I'm developing a motion detection sensor and I'm using a Processing application to implement rotations. Initially, a serial communication is established between an Arduino board connected to the PC and the Processing app. However, I'm not using…
joseph
  • 353
  • 3
  • 6
  • 10
-2
votes
1 answer

Is spoofing attack possible in RS232 communication?

I am a rookie in network security field. I am eager to know if it is possible for a spoofing attack on a serial communication like RS232?
user_abh
  • 357
  • 3
  • 6
  • 20
-3
votes
1 answer

Serial Communication C++ Select Connect

main #include "stdafx.h" #include #include "SerialPort.h" #include using namespace std; int main() { cout << "Monitoring System \n"; cout << "Please select a connection method\n\n"; cout << "1.Serial 2.TCP…
taek9105
  • 5
  • 2
-3
votes
2 answers

Send data from Arduino to Pi over serial communication

What is the problem and why do we need to do this? I recently purchased an MPU6050 breakout board. I tried it with my Arduino Uno, and with my Raspberry Pi 3. It gives this weird output with Raspberry (without any motion / in stable…
1 2 3
61
62