0% found this document useful (0 votes)
50 views7 pages

The RS-232 Serial Communications Protocol As Used Today

RS-232 serial communication is still widely used today due to its simplicity. It allows for basic transmission of data between devices using just three wires. While it provides a low-speed transmission method, RS-232 can effectively connect smart devices and transmit basic data through establishing common protocols for baud rate, data bits, stop bits, and parity to ensure synchronized communication between devices. The protocol defines the electrical and physical standards and frame formatting for serial transmission and reception.

Uploaded by

Hamit Aydın
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views7 pages

The RS-232 Serial Communications Protocol As Used Today

RS-232 serial communication is still widely used today due to its simplicity. It allows for basic transmission of data between devices using just three wires. While it provides a low-speed transmission method, RS-232 can effectively connect smart devices and transmit basic data through establishing common protocols for baud rate, data bits, stop bits, and parity to ensure synchronized communication between devices. The protocol defines the electrical and physical standards and frame formatting for serial transmission and reception.

Uploaded by

Hamit Aydın
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

The RS-232 Serial Communications Protocol As Used Today

Serial Protocol Definition

Serial communication involves sending one bit at a time. This is one of the slowest means of data transmission, however, it is still widely used in the scientific community because it is also one of the simplest and most expedient. There are a few serial communications standards, this article will address mainly RS-232 !"S#$%#!-232& and the simple three wire transmissions for illustration of the underlying principals of serial communication.

History

#n '()3 the !S*## standard was published and is still used today in Serial communications. #n '()( the RS-232 protocol was published. The serial protocol is very capable of sending binary data, and was used for mostly that until the mid '((+s. ,owever in '((- and '(() the .ire/ire and 0S1 protocol respectively relegated RS-232 to the scientist, engineer, and the ham radio operator. .ire/ire and 0S1 standards brought very high speeds to serial data transmission and provide much more current to drive low power nodes and other devices.

Benefits

!s of today, simple three wire serial communication is the easiest way to connect smart devices 2uic3ly. /hen the devices do not need to transmit huge amounts of data, li3e engine sensors, gps devices, air plane instrumentation, robotic controls, cooling systems for mainframes, etc, serial is the way to go. /ith a couple of lines of code and few minutes with a soldering iron, chances are, you4re up and running5 Some high-tech watches even communicate there internal problems to a computer via serial, so the technician may better diagnose the problem5 www.brainlubeonline.com$watchpage.html This is because serial 0!RTS and$or microcontrollers that support the serial protocol can be exceedingly small as a result of the protocols simplicity.

Limitations

/ithout complex phase modulation techni2ues, ()++ baud transmissions are limited to around 2-+ feet of shielded cable with RS-232. This is an extremely slow data rate by todays standards. !nother draw bac3 is the protocol doesn4t leave any room for anything more than truly simple devices to be powered by the serial cable its self. The good news is, the protocol leaves ample room for the devices that can afford to power ob6ects through the serial cable to do 6ust that7 for example, a 8#*'9: microcontroller can power a device or another 8#*& with - volts ; ' amp for a '++< duty cycle, That4s a - watt device5

Lo Le!el Com"osition =ethods> !t the simplest level, a send, a receive, and a ground wire are the only connections needed for full

duplex communications. www.brainlubeonline.com$rs232.html . ,owever, with a 0!RT 0niversal !synchronous Receive$Transmit& #*, or a method of coding called 1it-1anging that calls functions to access the computers cloc3, much higher speeds are possible. There are two root types of serial transmissions, synchronous and asynchronous. Synchronous serial transmissions, send bits from sender to receiver and bac3, to synchroni?e both transceivers. This allows higher speed data transmissions than asynchronous communications because a start and stop bit don4t need to be appended to the data pac3ets as they would need to be with the asynchronous scheme.

Specifications> RS-232 by the boo3s is limited to fifty feet maximum cable length, many serial hot-rodders have surpassed this. Serial wor3s by as much of as possible& a s2uare wave voltage over time&. 8eriod and duty cycle will be decided by the agreed upon baud rate. @ood house 3eeping denotes a positive 2.- to '- volts e2ual a logic + and negative 2.- to '- volts give you a logic '. ,owever, with many microcontrollers and embedded systems not e2uipped with 0!RTs, a positive - volts and a nice pullto-ground is 6ust fine for a logical + and ' respectively. This is inverted as compared to most systems and so ma3es easy wor3 for testing communication lines with a multimeter. "ine pins are re2uired for the full spectrum of what RS-232 has to offer. .or hardware handsha3ing, five pins are needed7 Aata *arrier Aetect, Aata Terminal Ready, Aata Set Ready, Re2uest To Send, and *lear To Send. 8ac3et transmission needs two dedicated pins, Serial Aata #nput, and , you guessed it, Serial Aata Butput. The ninth pin is a ring indicator for modem use, or to Cwa3eD some device up&.

Testing the 8hysical Ein3> To test the serial data output line, turn off stop$start bits and parity. Then, understand your baud rate, for instance if you are running at ()++ baud that4s a bit time of '$()++ of a second, or '+Fms. (.) 3ilocycles a second 3ilohert?&, and a duty of '+Fms high, means a '++< time duty cycle. To test this,

put the line to an oscilloscope, and create a send loop transmitting an !S*## 32 or any base two 1inary number, 2, F, etc.&. These creates a logical bit level ' every ()++ divided by n number of data bits of time, this will scope in your idea pulse rate. #f the time error is greater than G'< maybe you need to retune your e2uipment.

#id Le!el Com"osition

1aud Rate> The speed of serial transmissions is timed in a ratio denoted 1aud. #n its simplest form ' baud is ' bit per second. Therefore, '2++ baud is '2++ bits per second7 since the serial protocol is one bit at a time, the baud rate also tells us the sampling rate of the transmission. This means two transceivers communicating at 33,)++ baud both have there 0!RT cloc3s oscillating at 33,)++ cycles per second or 33.) 3ilohert?. Transmission speed is limited by many variables. Aistance limits cloc3 speed mainly because of the internal resistance of the transmission wires, but also because of induction. The halleffect has some small amount of degradation to the transmission. Bver vast distances, hardware will start to see an R=S reading of two distinct pulses. #n other words, it is possible to turn the transmitter into a pulse width modulator or a digital to analog converter. #n the H+s, through the (+s, RS-232 was used through the phone lines for access to primitive internet haha&. Speed then was limited because of phone company band pass filters and noise laden cables. ,owever in short distances, the author has made serial interfaces from microcontroller to microcontroller at ''-.2 3ilobaud5

Aata 1its> =any bits are pac3aged together in groups of li3e numbers for data transmission. This could be thought of as people representing bits& gathering onto a train car. /hen one car is full the next car pulls

forward and loads the same number of people or bits& to be carried off to some distant land. These pac3ages of data are called pac3ets. RS-232 will let sender and receiver agree to any number of pac3et si?e so long as both transceivers are in accordance& however, standard pac3et si?es are -, H, and 9 bits. These are the actual raw data elements that needs to be transmitted, not including the start$stop bits, and parity, which will be discussed later. /hen the number of data bits is being set for pac3et si?e, one must ta3e into account what type of data will be predominantly sent. .or instants, if transmitting standard !S*##, a H data bit pac3et would be preferred +-'2H&, if extended !S*## were to be sent, then an 9 data bit pac3et would be desired +-2--&. This not only ma3es for a more efficient transfer it also cuts down on the appending of Cfiller bitsD in the transmission. /hen an 4"4 amount of bits cannot be evenly divided by the pac3et data bit si?e, you will have partial end pac3ets, these pac3ets are filled with !S*## "0EE +&. This can increase your file si?e and must, in most situations, be trimmed at the software level.

Stop bits> Stop bits signal the end of a pac3et. Since the data is essentially represented by a s2uare wave voltage$ time&, and the sender and receiver cloc3s can slip out of synchroni?ation, stop bits give the computers or routers or whatever is communicating, room for error in cloc3 speed measured in 8arts 8er =illion of error counts&. RS-232 suggests typical values of ', '.-, and 2 bits. ,owever, any number of stop bits may be used. The greater the number of stop bits the slower the data rate, this is simply because there is now more data to convey and more data to process if on a limited system such as a router controller or small robot&. The greater the number of stop bits, the greater the modulation error that can be afforded in two separate phase loc3ed loops. This means when using a techni2ue such as bit-banging software calling hardware cloc3 functions& where cloc3 error will be common, one needs to use a high number of stop bits.

8arity> 8arity is an error detection scheme for serial communication. 8arity can be turned on or off used or not used&, and there are four methods of parity. The first two are denoted odd parity, and even parity. #n this system, a logical ' or + is inserted at the end of the data set data bit portion& of the pac3et. .or odd parity, if the data bits were ++'''++, the parity bit would be set to + to 3eep the dataset odd, if the data transmission were +'''+'+, the parity bit would be set to a logical ', again to 3eep the data set odd. This can be inversed by using even-parity. The H-bit data set +''++++ would have an even parity bit of + to 3eep the count even. The remaining to methods are mar3ed parity and spaced parity. These methods do not chec3 the data bits at all, instead they set the parity bit to high for mar3ed and low for spaced. The receiver 3nows to expect these parity bits and if it does not, it 3nows there is a synchroni?ation problem, excessive noise or other problems in the transmission.

Hi$h Le!el Com"osition

%rror *orrection> #n RS-232 error correction is handled on the software level or programmed hardware&. #n a /indows environment, library functions for =icrosoft4s *, and Iisual 1asic, and whatever they have decided Sun4s J!I! is today, include an %IK%RR, which indicates an Cerror eventD or mis-communication. The *B=ST!T structure will tell where in time, pac3et, and process the even occurred. There are many complex error correction methods that sometimes do not re2uire the resubmission of the pac3et in error, however for RS-232 the most effectual way of error correction is to transmit a call to resend the pac3et or pac3ets.

%ncryption> Since most of the RS-232 wor3 now is machine commands and not really Csensitive dataD this is rarely

an issue now. To compound this most machines do not have a time or resources to decode encrypted material. There are however simple easily crac3able& algorithms that can 6umble the data sent and be decoded with one simple transmission of a C3eyD. Bne method is, a level of permutation given by the 3ey number& that combinatorially sorts the data bits into a mess only to be resorted at the receiving computer or node. The level of sort and the amount of data is directly proportional to the amount of time it ta3es to code and decode with this method. Eowering the resolution of the permutations in possible if binaries and not words are being sent, by sorting pac3ets instead of individual bits. !n example of a suitable permutator code using recursion can be found here this version allows a user to input numbers to be sorted to illustrate the device&. www.brainlubeonline.com$cpa.html !nything more advanced than this will be a severe strain of devices with limited resources, and there are other protocols that are better suited for this type of wor3.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy