You are on page 1of 3

AN INSIGHT COMPARISON OF SERIAL COMMUNICATION PROTOCOLS

Gaurav Khurana1, Umesh Goyal2

Electronics and Electrical Communication Department, PEC University of Technology, Chandigarh, India, gauravkhurana07@gmail.com 2 Electronics and Electrical Communication Department, PEC University of Technology, Chandigarh, India, umesh.goyal330@gmail.com ABSTRACT An Embedded system consists of a large number of integrated circuits. For proper functioning of the system, these Integrated circuits need to communicate with each other. This communication is done using a number of universally accepted protocols as per the system requirement. These protocols include RS-232/RS-485, I2C, SPI and MOD bus protocol, CAN bus protocol. This paper describes the basics of these protocols and also compares them with the help of some performance parameters like speed, data rate, error handling. This paper also provides the brief of implementation of these protocols i.e. how to implement them. Keywords: I2C, SPI, MOD bus, CAN bus, CANopen,
1.

INTRODUCTION

Any Embedded system is generally consisting of one or more micro-processors or micro-controller and a number of peripherals ICs like EEPROM, RTC, watchdog timer and sensors etc. For proper functioning of the system, these ICs need to communicate with micro-controller. Serial communication is preferred for this inter-IC communication because of obvious reason of simplicity, low cost and minimum requirement of I/O pins. Many serial communication protocols like RS-232/RS-485, I2C, SPI, Modbus and CAN bus etc. compete for use in embedded systems. All these protocol has their own advantages and limitations and selection of a particular protocol for an application needs an insight comparison of all available options, so this paper compares some of the popular serial communication protocols and highlights their features and specifications which can make the selection task easier. After the brief introduction of each protocol, this paper will compare these protocols. 2. PROTOCOL OVERVIEW

This section contains the overview of different serial protocols used in serial communication with different devices. These are as follows: 2.1 I2C (Inter- Integrated Circuit) 2.2 SPI (Serial Peripheral Interface) 2.3 Modbus Protocol Modbus is a serial communications protocol published by Modicon in 1979. MODBUS Protocol defines a standard message structure with universal recognition and usage regardless of the type of networks over which any two devices communicate. It is a master-slave

communication protocol. It describes the process a master uses to request an access to slave, and how the slave will respond to these requests, and how errors will be detected and reported. Master can initiate transactions (called queries) and slave respond by supplying the requested data to the master, or by taking the action requested in the query. The master can address individual slaves, or can initiate a broadcast message to all slaves. Slaves return a message (called a response) to queries that are addressed to them individually. Responses are not returned to broadcast queries from the master. Masters query consists of slave device (or broadcast) address, a function code defining the requested action, any data to be sent, and an error checking field. The slaves response contains fields confirming the action taken, any data to be returned, and an errorchecking field. If the slave makes a normal response, the function code in the response is an echo of the function code in the query. If an error occurred in receipt of the message, or if the slave is unable to perform the requested action, the slave will construct an error message by modifying the function code (set the MSB of function code) to indicate that the response is an error response, and the data bytes contain a code that describes the error. Modbus protocol can be established in two kinds of transmission mode: ASCII mode or RTU mode. In ASCII mode, each 8bit byte in a message is sent as two ASCII characters. In RTU mode, each 8bit byte in a message contains two 4bit hexadecimal characters. The main advantage of RTU mode is that its greater character density allows better data throughput than ASCII for the same baud rate. Modbus protocol has the parity check, besides, the ASCII mode uses the LRC check, and the RTU mode uses 16 CRC check. 2.4 CAN bus The font size for heading is 12 points bold face and subsections with 12 points and not bold. Do not underline any of the headings, or add dashes, colons, etc. (12) 3. INDENTATIONS AND EQUATIONS(12 BOLD) The first paragraph under each heading or subheading should be flush left, and subsequent paragraphs should have a five-space indentation. A colon is inserted before an equation is presented, but there is no punctuation following the equation. All equations are numbered and referred to in the text solely by a number enclosed in a round bracket (i.e., (3) reads as "equation 3"). Ensure that any miscellaneous numbering system you use in your paper cannot be confused with a reference [4] or an equation (3) designation. (12) 4. FIGURES AND TABLES(12 BOLD) To ensure a high-quality product, diagrams and lettering MUST be either computerdrafted or drawn using India ink. Figure captions appear below the figure, are flush left, and are in lower case letters. When referring to a figure in the body of the text, the abbreviation "Fig." is used. Figures should be numbered in the order they appear in the text. Table captions appear centered above the table in upper and lower case letters. When referring to a table in the text, no abbreviation is used and "Table" is capitalized. (12). Figures and tables should be included in the running text itself 5. CONCLUSION (12 BOLD) A conclusion section must be included and should indicate clearly the advantages, limitations, and possible applications of the paper. Although a conclusion may review the

main points of the paper, do not replicate the abstract as the conclusion. A conclusion might elaborate on the importance of the work or suggest applications and extentions. (12)

6. Acknowledgements (12 Bold) An acknowledgement section may be presented after the conclusion, if desired.( 12) REFERENCES (12 BOLD) This heading is not assigned a number. A reference list MUST be included using the following information as a guide. Only cited text references are included. Each reference is referred to in the text by a number enclosed in a square bracket (i.e., [3]). References must be numbered and ordered according to where they are first mentioned in the paper, NOT alphabetically. Examples follow: Journal Papers: [1] M Ozaki, Y. Adachi, Y. Iwahori, and N. Ishii, Application of fuzzy theory to writer recognition of Chinese characters, International Journal of Modelling and Simulation, 18(2), 1998, 112-116. (12) Books: [2] R.E. Moore, Interval analysis (Englewood Cliffs, NJ: Prentice-Hall, 1966). (12) Note that the title of the book is in lower case letters and italicized. There is no comma following the title. Place of publication and publisher are given. Chapters in Books: [3] P.O. Bishop, Neurophysiology of binocular vision, in J.Houseman (Ed.), Handbook of physiology, 4 (New York: Springer-Verlag, 1970) 342-366. (12) Note that the place of publication, publisher, and year of publication are enclosed in brackets. Editor of book is listed before book title. Theses: [4] D.S. Chan, Theory and implementation of multidimensional discrete systems for signal processing, doctoral diss., Massachusetts Institute of Technology, Cambridge, MA, 1978. (12) Proceedings Papers: [5] W.J. Book, Modelling design and control of flexible manipulator arms: A tutorial review, Proc. 29th IEEE Conf. on Decision and Control, San Francisco, CA, 1990, 500-506 (12)

You might also like