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
4
votes
3 answers

printf raw data -- get printf or print to NOT send characters

I have a Xilinx Virtex-II Pro FPGA board that is attached via RS232 to an iRobot Create. The iRobot takes a stream of byte integers as commands. I've found that printf will actually send over the serial port (Hypterminal is able to pick up whatever…
ZacAttack
  • 2,005
  • 5
  • 21
  • 34
4
votes
1 answer

Serial port output buffer size in Windows 7

Unix serial ports have a large output buffer. Write calls return immediately as long as there's space in the buffer. When there isn't enough space, a blocking write waits until the buffer is emptied to some low level. In Windows 7 SP1, the built-in…
dreamlayers
  • 173
  • 1
  • 6
4
votes
1 answer

Flutter blluetooth serial communication

I have a microcontroller connected with HC-06 bluetooth module. I want to build a flutter app that can comunicate with the microcontroller to send an integer value via bluetooth and then receive integer values as well from the microcontroller. The…
4
votes
0 answers

Detect a break as the begining of a serial data frame (Windows IoT, Serial Device)

I need to catch the begining of a data frame via serial (FTDI) in a UWP app (C++/CX). The beginning of this frame is only determined by a break signal. By calling the functions LoadAsync / ReadBuffer / ReadBytes from the dataReader in a "kind of…
4
votes
3 answers

Serial port communication in common lisp

Is there a library for serial port communication in Common Lisp on Windows?
Paul Nathan
  • 39,638
  • 28
  • 112
  • 212
4
votes
1 answer

Reading data from Arduino UNO R3 kit

I'm trying to read the data already stored by me in the Arduino kit, I'm using the physicaloid library to achieve this. I tested the kit (reading data) by connecting it to my PC using the Type B USB cable provided by Arduino itself and using Tera…
DJphy
  • 1,292
  • 1
  • 17
  • 31
4
votes
3 answers

C# Serial Communications - Received Data Lost

Received data in my C# application is getting lost due to the collector array being over-written, rather than appended. char[] pUartData_c; private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e) { try { …
Jim Fell
  • 13,750
  • 36
  • 127
  • 202
4
votes
3 answers

iphone <-> real world connection

Any pointers on how to initiate serial communication with the iphone? Or any other idea to interact with external hardware?
Rodolfo Ruiz
  • 43
  • 1
  • 4
4
votes
2 answers

C# console application talking to Arduino via Bluetooth

Not a whole lot to say here other than this doesn't work, and I have no idea why. The serial output on the Arduino is nothing. The output on the C# code goes down to waiting for a response and then nothing. The Bluetooth card LED on the Arduino goes…
DotNetRussell
  • 9,716
  • 10
  • 56
  • 111
4
votes
2 answers

What is the state of the art in labour-automation data-exchange?

I just came across ASTM E1394-97 "Transferring Information Between Clinical Instruments and Computer Systems", because a supplier offers a system supporting this standard. It looks rather pre-DOS age. I wonder, if labour-automation lives in…
Valentin H
  • 7,240
  • 12
  • 61
  • 111
4
votes
1 answer

Virtual COM Communications Issue

I'm working on a Communications Device Class (CDC) driver for an embedded device, a Full Speed implementation of USB 2.0. The COM port settings are 115200, 8-bit, no parity, 1 stop bit, no flow control. Our PC application (32-bit, Windows 7, .NET…
Jim Fell
  • 13,750
  • 36
  • 127
  • 202
4
votes
1 answer

How to wait for right moment to write?

I'm trying to send my rs232 device multiple SerialPort.Write commands right after each other. However, I don't think it can handle multiple WRITE commands at once. Currently, I'm just using Thread.Sleep(500) to delay between WRITEs, but is there a…
3
votes
1 answer

Using the IO Kit to communicate with USB in Xcode 4

I'm making an application in Xcode 4 for MAC which purpose is to draw a graph of an ECG reading. The reading is supposed to be received over USB/serial. I therefore need to write code for the application that can read and write characters to the USB…
Cyberlurk
  • 766
  • 3
  • 9
  • 30
3
votes
5 answers

Modem gives ERROR after issuing ATDTnnnnnnn

I am attempting to call a remote modem using a local modem connected via USB. Programming language is VB.NET and I am using the SerialPort control to talk to the modem. Communication is as follows: I send: ATZ0[CR] Modem responds:…
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
3
votes
3 answers

Can an iOS app control a phone call?

My Mom's deaf. I typically talk to her using a TTY service and she has a TTY phone at her house. I've looked in to iOS TTY and all it ever says is about connecting a cable to the iPhone to use a physical TTY. TTY uses 50bit per second baud-dot…
NoMoreZealots
  • 5,274
  • 7
  • 39
  • 56