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
8
votes
5 answers

Sending an integer serially in Arduino

I need to send an integer, say between 0-10000, to Arduino using serial communication. What's the best way of doing that? I can think of breaking the number into an character array (eg: 500 as '5','0','0') and sending them as a byte stream (yeah,…
Anubis
  • 6,995
  • 14
  • 56
  • 87
8
votes
4 answers

php serial communication in linux

I have installed xampp in fedora 13.I am trying to communicate with microcontroller through serial port using php serial class. My code is example.php include("php_serial.class.php"); $serial = new…
prudhvi09
  • 81
  • 1
  • 1
  • 4
7
votes
2 answers

Connect the Accessory to my JailBreak iPhone Device

I am using serial programming for get connected serial cable to my iPhone my code is as under #include /* Standard input/output definitions */ #include /* String function definitions */ #include /* UNIX standard…
Raj
  • 1,213
  • 2
  • 16
  • 34
7
votes
1 answer

USB Communication between android and PC

Background :I have tried finding help on stackoverflow, android developers, and various other resources on web. This is my last hope. I am new to communication and starting with implementation of USB. Following are my questions: 1) When I connect my…
Neeraj gupta
  • 171
  • 1
  • 2
  • 9
7
votes
1 answer

Start and Stop Bit (Serial Communication)

What will happen if there is no Start and Stop Bit in Serial Communication? What is the use of Start and Stop Bit?
user3225006
  • 81
  • 1
  • 1
  • 3
6
votes
6 answers

RS232 for iOS device

Is it possible to pair an iDevice to an rs232-bluetooth adapter for the purpose of sending serial commands like it would through an iDevice dock connector to rs232 (just like the Redpark Serial Cable does)? I ask because the company I work for is…
mike_r
  • 123
  • 1
  • 2
  • 9
6
votes
1 answer

Changing serial port configurations programmatically in c#

I have 2 types of devices that have different protocols and are connected with a single serial port. By protocol, I mean that serial port configurations are different. I have a protocol id p_id by which I can check which device is being currently…
Moeez
  • 494
  • 9
  • 55
  • 147
6
votes
2 answers

How to correctly communicate with 3D Printer

I have to write a java program that receives G-Code commands via network and sends them to a 3D printer via serial communication. In principle everything seems to be okay, as long as the printer needs more than 300ms to execute a command. If…
theCNG27
  • 405
  • 8
  • 27
6
votes
1 answer

What serial file transfer protocol to use?

I'm looking for some input on witch file transfer protocol to use over a serial line. I want to be able to transfer files of max 200 Mb size over a serial line (RS232) in both directions, but only one of the machines needs to be able to initiate the…
c0m4
  • 4,343
  • 10
  • 35
  • 40
6
votes
2 answers

How to write serial data to COM ports with Universal Windows Application?

Typically C# applications use System.IO.Ports like so: SerialPort port = new SerialPort("COM1"); port.Open(); port.WriteLine("test");` But Universal Windows Applications don't support System.IO.Ports so this method cannot be used. Does anyone…
Charles Clayton
  • 17,005
  • 11
  • 87
  • 120
6
votes
4 answers

How to use JAVA to control LED light connecting to PC via USB/SerialPort/etc.? What device should I use?

I would like to write a program in JAVA which can control LED lights connecting to "something" that is connected to the computer. JAVA program will consist of 8 toggle buttons in JFrame. The buttons are numbered from 1 to 8, and when the button with…
Northnroro
  • 525
  • 1
  • 6
  • 10
6
votes
2 answers

Multiple serial values from arduino to processing?

I have a small problem. I am passing information from an arduino attached 3 axis accelerometer + 3 axis magnetometer + compass heading. These are scaled to midi ranges (0-127). ARDUINO: This is passed in a serial print with a format like…
6
votes
1 answer

kernel driver reading ok from user space, but writing back is always 0

So I'm working my way through kernel driver programming, and currently I'm trying to build a simple data transfer between application and kernel driver. I am using simple character device as a link between these two, and I have succeeded to transfer…
julumme
  • 2,326
  • 2
  • 25
  • 38
6
votes
2 answers

Identification of packets in a byte stream

I'm having a bit of a problem with the communication to an accelerometer sensor. The sensor puts out about 8000 readings/second continuously. The sensor is plugged in to a usb port with an adaper and shows up as com4. My problem is that I can't seem…
karra
  • 176
  • 4
  • 15
6
votes
4 answers

CAN Bus Protocol Implementation

I want to learn and implement CAN BUS protocol. I have implemented UART,SPI,I2C and One Wire Bus protocol using MSP430 Launchpad in software. Now I want to learn about CAN Bus protocol. I have mBed LPC 1768 Cortex M3 Development board. mBed has Can…
Gaurav K
  • 2,864
  • 9
  • 39
  • 68
1
2
3
61 62