SlideShare a Scribd company logo
1 of 5
Download to read offline
Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and
Applications (IJERA) ISSN: 2248-9622 www.ijera.com
Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800
1796 | P a g e
Implementation of Serial Communication between PC and DSP
Processor Using Modbus Protocol
Nagendra Sah1
, Gaurav Khurana2
1
(Sr. Asstt. Professor, Electronics and Electrical Communication Department, PEC University of Technology,
Chandigarh
2
(M.E., Electronics and Electrical Communication Department, PEC University of Technology, Chandigarh
ABSTRACT
This paper described the principle,
application and implementation of serial
communication between PC and a Digital Signal
Processor (DSP). The TMS320F28031 which is a
type of DSPs made by Texas Instruments (TI) is
used in this implementation. This DSP processor
has serial communication interface (SCI) module
for serial communication. The SCI is a two− wire
asynchronous serial port, commonly known as a
UART (Universal Asynchronous
Receiver/Transmitter). The standard of Modbus
protocol is implemented for this serial
communication. The Modbus protocol provides an
industrial standard method that Modbus devices
use for parsing messages. PC (Personal
Computer) can read/write one or more registers of
DSP processor using Modbus communication. This
paper highlights the basics of Modbus protocol
and also explains the software detail of Modbus
implementation.
Keywords - DSP processor, Modbus protocol,
UART, serial communication
I. INTRODUCTION
Although all the real time signals are
analogue in nature but due to the huge advancement
in digital signal processing, all the signals are
processed in digital form. As we all know, Digital
signal processing has number of advantages over
analogue signal processing. To process the real time
signal in digital domain, first of all we have to convert
that analogue signal into digital signal using ADC
(Analog to Digital Converter) and after signal
processing; we have to convert digital output back
into analogue form by using DAC (Digital to Analog
Converter).
Due to huge advancement in the field of
VLSI (Very Large Scale Integration) in the past few
years, there are number of digital Integrated Chips
(IC’s) are available in the market for performing the
above task more efficiently and accurately. These
digital IC’s are commonly known as digital signal
processor (DSP). DSP has been used widely in auto
controller, image process, communication, network,
home electrical appliances, and so on. Currently, the
most widely used product come from Texas
instruments (TI) which takes up almost 60 % of the
market [1]. TMS320F28031 is a chip which is a
product made by TI. Unlike some other chips, it uses
an advanced Havard type architecture that maximizes
processing power by maintaining two separate
memory bus structures, one memory section for
storing program and other for storing data. This will
increase the program execution speed. This chip has
several integrated peripherals like ADC, SCI, Timer
and PWM (Pulse Width Modulator) etc. [2].
The Modbus is one of the most common
serial communication protocol used in industrial
application for process control. Using Modbus
protocol a number of controllers and intelligent
devices and communication with each other over any
network. Actually Modbus protocol defines a
messaging structure which is universally accepted and
used. In this paper, we have established a serial
communication between PC and DSP processor using
Modbus protocol. The master sends a command in
hexadecimal and slave responds with its response in
hexadecimal too. In order to display the result,
software called Modbus tester is used. Same software
is also used to configure the communication
parameters like communication mode, baud rate, start
bits, stop bits and parity bits etc.
II. HARDWARE STRUCTURE
A. SCI
TMS320F28031 DSP processor has an on
chip serial communication interface (SCI) as one of
its peripheral in its core. SCI is a two−wire
asynchronous serial port and it supports digital
communications between the CPU (Central
Processing Unit) and other asynchronous peripherals
that use the standard non-return-zero (NRZ) format.
The SCI receiver and transmitter are double-buffered
and each has a 4-level deep FIFO (First in First Out)
for reducing servicing overhead. Both have their own
separate enable and interrupt bits and both can be
operated independently for half-duplex
communication, or simultaneously for full duplex
communication. To ensure data integrity, the SCI
checks received data for break detection, parity,
overrun, and framing errors. The bit rate is
programmable to over 65000 different speeds through
a 16-bit baud select register [3].
SCI module has two external pins for serial
communication that is SCITXD (SCI transmit output
Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and
Applications (IJERA) ISSN: 2248-9622 www.ijera.com
Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800
1797 | P a g e
pin) and SCIRXD (SCI receive input pin). Serial
Transmission and reception operations can be
accomplished through interrupt driven or polled
algorithms. Here interrupt driven technique is used for
communication in full duplex mode.
Major elements of SCI module is shown in figure 1
and it includes:
TXD pin
RXD pin
Fig. 1 Internal Device Structure
A transmitter (TX) and its major registers
(upper half of Figure 1) are:
SCITXBUF register (SCI transmitter data
buffer register) - it Contains data (loaded by the
processor) to be transmitted to the remote PC.
TXSHF register (SCI transmitter shift register) - It
accepts data from register SCITXBUF and shifts data
onto the SCITXD pin, one bit at a time.
A receiver (RX) and its major registers
(lower half of Figure 1) include:
RXSHF register (SCI receiver shift register) - It
shifts in the data from SCIRXD pin, one bit at a time.
SCIRXBUF register (SCI receiver data buffer
register) - It contains data to be read by the DSP
processor. Data from a remote PC is loaded into
register RXSHF and then into registers SCIRXBUF.
III. MODBUS PROTOCOL
The 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. Figure 2 shows the query
response cycle of Modbus communication.
Fig. 2 Modbus master-slave query-response cycle
As shown in figure 2, master’s 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 slave’s response contains
fields confirming the action taken, any data to be
returned, and an error–checking field. Slave confirms
the action taken by sending the echo of function code
sent by the master.
Table I shows the Application Data Unit
(ADU) and Protocol Data Unit (PDU) of Modbus
protocol. PDU is consisting of function field (1 byte)
and data field (variable bytes) and ADU is consisting
of address field (1 byte), PDU and error checking
field (2 bytes) [4].
Table I Modbus data format
Protocol data unit
(PDU )
Application Data unit(ADU)
1 byte 1 byte Variable 2 bytes
Address
field
Function
field
Data field Error
checking
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 (Most significant Bit) of function code) to
indicate that the response is an error response, and the
data bytes contain a code that describes the error [5].
Some of the commonly used function codes are
shown in table II.
SCITXBUF
Transmitter
section
SCIRXBUF Receiver
section
Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and
Applications (IJERA) ISSN: 2248-9622 www.ijera.com
Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800
1798 | P a g e
Table II List of commonly used function
codes in Modbus protocol
Code Name
01 Read single coil status
02 Read input status
03 Read multiple holding registers
04 Read multiple input registers
05 Write single coil
07 Read Exception Status
15 Write multiple coils
16 Write multiple registers
23 Read/Write multiple registers
Modbus protocol can be established in two kinds of
transmission mode: ASCII (American Standard Code
for Information Interchange) mode or RTU (Remote
Terminal Unit) mode. In ASCII mode, each 8–bit byte
in a message is sent as two ASCII characters. In RTU
mode, each 8–bit byte in a message contains two 4–bit
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 (Longitudinal Redundancy
Check) and the RTU mode uses 16 CRC (Cyclical
Redundancy Check).
Table III is a comparison between ASCII mode and
RTU mode.
Table III Comparison of ASCII and RTU
mode
According to Table III, the data transmission rate
of ASCII mode is a little lower than RTU mode. So,
when need to send large data, user always uses RTU
mode. The standard Modbus protocol is to use a RS-
232C compatible serial interface, which defines the
port pin, cable, digital signal transmission baud rate,
parity.
IV. IMPLEMENTATION OF COMMUNICATION
A. Configuration Setting
In order to implement the Modbus protocol
communication between PC and DSP processor, first
of all we should configure both PC and DSP
processor for the same communication mode and
same baud rate that is 9600 bps (bits per second) [6].
As explained earlier, there are two modes of serial
communication in Modbus protocol that is ASCII
mode and RTU mode. In this implementation we have
used the later one. Configuration used in this
implementation is shown in table IV.
Table IV PC and DSP processor communication
Configuration
Communication
Mode
Remote Terminal Unit
(RTU)
Baud Rate 9600 bps
Data bit 8 bits
Stop bit 1 bit
Parity bit None
Baud rate is nothing but data transfer rate which must
be same at both the terminals (PC and DSP
Processor). PC baud rate is configured by using
Modbus communication interface software named
Modbus tester and DSP processor’s baud rate is
configured by using its control registers. Following
formulas are in this process:
Baud rate = Sysclk / (BRR+1) × 8 (1)
BRR = Sysclk ( aud rate ) 1
(2)
In “Eq. (1)”, the Sysclk stands for system clock
frequency and the RR in “Eq. (2)” is the value of
SCIHBAUD and SCILBAUD registers that you
should configure.
After setting the proper baud rate, the serial
communication is established by using two wire
communication method. Modbus protocol is
master/slave protocol and communication can be
initiated by master only and here PC is working as
master and DSP Processor is working as slave. So PC
will initiate this communication and sends a command
to read DSP Processor’s 7 input registers. Each
register is of 2 bytes. But data field in Modbus
protocol is of 8 bits so each register is represented by
two data bytes. First byte represents higher byte and
second byte represents lower byte. Hence 7 register is
equal to 14 bytes. Slave address is 8 bit long and it is
settable. In this project, we have used only one slave
and its address is 01.
B. Software Flow
This communication is implemented in TI
tool code compose studio. Code Composer Studio™
(CCStudio) is an integrated development environment
(IDE) for Texas Instruments (TI) embedded processor
families. CCStudio comprises a suite of tools used to
develop and debug embedded applications. Timer 0
interrupt service routine of TMS320F28031 is used in
this implementation. Timer 0 is configured to generate
an interrupt after every 20 microsecond. In timer 0
ISR (interrupt service routine), we check the flag bit
showing the reception of data byte. If this flag bit is
Mode Begi
nnin
g
mar
ks
Endi
ng
mar
ks
Check Trans
missio
n
efficien
cy
Progra
m
Process
ing
ASCI
I
:
(col
on)
CR,
LF
LRC low
Direct,
easy to
debuggi
ng
RTU Non Non CRC High
Indirect,
slightly
comple
x
Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and
Applications (IJERA) ISSN: 2248-9622 www.ijera.com
Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800
1799 | P a g e
set, it shows that byte has been received. Then we
process the received the data to extract the useful
information form this data [7].
First byte is slave ID (slave address). So first
of all, we compare the received byte with the address
of that slave. It received byte matches with the slave
ID. It means that next whole data frame is addressed
to this slave and we will process the whole data frame
otherwise we will ignore the whole data frame. Then
we go for CRC check. It will tell about the frame
validity. If frame is invalid, program will generate a
response showing error in received frame using
exception code. Next step is extracting the
information from function code. List of commonly
used function code is shown in table II. Then create
the slave response according the function code.
C. Read Input Registers of DSP Processor
Here PC is master and will initiate the
communication so it is working as transmitter and
DSP Processor’s response is received by the PC [8].
The communication traffic is shown in figure 3.
Fig. 3 Modbus communication traffic
As shown in figure 3, TX (Transmitter)
represents the command sent by PC to DSP processor
and RX (Receiver) is the response sent by DSP
processor to PC. Analysis of TX data is given in table
V.
Table V Data sent from PC to DSP
Processor
Code (Hex) Meaning
01 Slave Address.
04 Function code( read multiple
input register)
00 Starting address of input
registers(higher)
00 Starting address of input register
(lower)
00 Number of registers (higher)
07 Number of registers ( lower)
B1 CRC (higher)
C8 CRC (lower)
From table V it is clear that, PC wants to
read multiple input registers of slave whose address is
01. Starting address (16 bits) of these registers is
0000h is also given by the master in its command and
number register is 0007h. Last two bytes are CRC
check bits for detecting the error in the transmitted
code.
RX is the response sent by DSP Processor to
PC and analysis of Rx is given in table VI:
Table VIData sent from DSP Processor to PC
Code (Hex) Meaning
01 Slave Address.
04 Function code (echo of function
code sent by master, as no error is
detected by slave in Tx code. If
slave detect some error in Tx code
then it exception code which is
also echo of original function code
with its MSB is equal to logic 1)
0E 14 bytes(2*7 registers) in data
field
00 Content of first register (higher)
00 Content of first register (lower)
00 Content of second register (higher)
96 Content of second register (lower)
00 Content of third register (higher)
B9 Content of third register (lower)
00 Content of fourth register (higher)
5A Content of fourth register (lower)
00 Content of fifth register (higher)
D2 Content of fifth register (lower)
00 Content of sixth register (higher)
91 Content of sixth register (lower)
00 Content of seventh register
(higher)
71 Content of seventh register (lower)
C2 CRC (higher)
E4 CRC (lower)
It is clear from table VI that, each 16 bit register is
represented by two data fields each of 8 bit long.
Hence content each register is shown in hexadecimal
and decimal in table VII.
Table VII 16 bit register content in hexadecimal
and decimal format
Register
number
Content in
Hex
Content in
Decimal
01 0000h 00
02 0096h 150
03 00B9h 185
04 005Ah 90
05 00D2h 210
06 0091h 145
07 0071h 113
Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and
Applications (IJERA) ISSN: 2248-9622 www.ijera.com
Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800
1800 | P a g e
V. RESULTS AND DISCUSSION
Results are shown in figure 4. It is clear from
figure 4 that master (PC) send a command to read 7
input registers (14 bytes) of DSP processor and then
DSP processor create a response message consist of
19 bytes (1 byte slave ID, 1 byte function code, 1 byte
to show number of bytes in data unit (that is 14 in this
example), 14 bytes of data and 2 bytes of CRC).
Modbus tester software check integrity of slave
response if response is found to be valid then it extract
14 byte data unit from 19 byte slave response and
display the result in decimal as shown in figure 4.
Fig. 4 results display in Modbus tester
VI. CONCLUSION
Modbus protocol is implemented and serial
communication between PC and DSP Processor is
established and results are displayed using Modbus
tester software. Thus, we can easily interface a
number of digital IC’s like DSP processors with our
PC using Modbus protocol. So this communication
technique can be one of well choice in industrial
control applications.
REFERENCES
[1] Zhang Zhi-Qiang, and Zhang Yu-lin,
“Realization of Communication Between
DSP and PC Based on Modbus Protocol,”
IEEE International Conference on
Multimedia Information Networking and
Security, 2009, pp. 258-261.
[2] Peng D.G, Zhang H., Yang Li and Li H.
“Design and Realization of Modbus Protocol
ased on Embedded Linux System,” The
2008 International Conference on Embedded
Software and Systems Symposia. July 29-31,
2008, Chengdu, Sichuan, China pp. 275-
280.
[3] TI, TMS 320F/28031 DSP Controllers
Peripheral Library and Specific Devices,
Dallas: Texas Instrument, 2007, pp.56-72.
[4] Zhi-Hua Chen, Min Shi, Qing-Ming Yi,”A
Method for DSP asynchronous Serial port
Expansion ased on TL16C752 ,” IEEE,
2011, pp. 844-847
[5] Yue Y., Zhang C.G., Yuang A.J., “Design
and implementation of Embedded Man-
Machine Interface ased on Modbus”.
Industrial Control Computer, 2006, 19(1) pp.
8-10.
[6] TI, TMS 320F/28031 DSP Controllers
Peripheral Library and Specific Devices,
Dallas: Texas Instrument, 2007, pp.96-102.
[7] Song J, QU J P, “Realization of
Communication Between PCC and Touch
Screen ased on Modbus Protocol,” Electric
Machine Integration, vol. II, Nov. 2007, pp.
28-73.
[8] TI, TMS 320F/28031 DSP Controllers
Peripheral Library and Specific Devices.
Dallas: Texas Instrument, 2007, pp 176-185.

More Related Content

What's hot

Review on Transmission and Reception of Data through USB in VHDL
Review on Transmission and Reception of Data through USB in VHDLReview on Transmission and Reception of Data through USB in VHDL
Review on Transmission and Reception of Data through USB in VHDLIRJET Journal
 
Design and implementation of log domain decoder
Design and implementation of log domain decoder Design and implementation of log domain decoder
Design and implementation of log domain decoder IJECEIAES
 
MULTIPLE CHOICE QUESTIONS WITH ANSWERS ON NETWORK MANAGEMENT SYSTEMS
MULTIPLE CHOICE QUESTIONS WITH ANSWERS ON NETWORK MANAGEMENT SYSTEMSMULTIPLE CHOICE QUESTIONS WITH ANSWERS ON NETWORK MANAGEMENT SYSTEMS
MULTIPLE CHOICE QUESTIONS WITH ANSWERS ON NETWORK MANAGEMENT SYSTEMSvtunotesbysree
 
Fpga implementation of multi protocol data
Fpga implementation of multi protocol dataFpga implementation of multi protocol data
Fpga implementation of multi protocol dataeSAT Publishing House
 
Glossary of Technical Terms for Process Weighing
Glossary of Technical Terms for Process WeighingGlossary of Technical Terms for Process Weighing
Glossary of Technical Terms for Process WeighingPower Specialties, Inc.
 
AN EFFICIENT VITERBI DECODER
AN EFFICIENT VITERBI DECODERAN EFFICIENT VITERBI DECODER
AN EFFICIENT VITERBI DECODERIJCSEA Journal
 
VTU 6TH SEM CSE COMPUTER NETWORKS 2 SOLVED PAPERS OF JUNE-2013 JUNE-14 & JUNE...
VTU 6TH SEM CSE COMPUTER NETWORKS 2 SOLVED PAPERS OF JUNE-2013 JUNE-14 & JUNE...VTU 6TH SEM CSE COMPUTER NETWORKS 2 SOLVED PAPERS OF JUNE-2013 JUNE-14 & JUNE...
VTU 6TH SEM CSE COMPUTER NETWORKS 2 SOLVED PAPERS OF JUNE-2013 JUNE-14 & JUNE...vtunotesbysree
 
MULTIPLE CHOICE QUESTIONS ON COMMUNICATION PROTOCOL ENGINEERING
MULTIPLE CHOICE QUESTIONS ON COMMUNICATION PROTOCOL ENGINEERINGMULTIPLE CHOICE QUESTIONS ON COMMUNICATION PROTOCOL ENGINEERING
MULTIPLE CHOICE QUESTIONS ON COMMUNICATION PROTOCOL ENGINEERINGvtunotesbysree
 
Embedded real time-systems communication
Embedded real time-systems communicationEmbedded real time-systems communication
Embedded real time-systems communicationVijay Kumar
 
IRJET-Error Detection and Correction using Turbo Codes
IRJET-Error Detection and Correction using Turbo CodesIRJET-Error Detection and Correction using Turbo Codes
IRJET-Error Detection and Correction using Turbo CodesIRJET Journal
 
Training Report BHARAT ELECTRONICS LIMITED
Training Report BHARAT ELECTRONICS LIMITEDTraining Report BHARAT ELECTRONICS LIMITED
Training Report BHARAT ELECTRONICS LIMITEDHimanshiSingh71
 
OPTICAL SWITCHING CONTROLLER USING FPGA AS A CONTROLLER FOR OCDMA ENCODER SYSTEM
OPTICAL SWITCHING CONTROLLER USING FPGA AS A CONTROLLER FOR OCDMA ENCODER SYSTEMOPTICAL SWITCHING CONTROLLER USING FPGA AS A CONTROLLER FOR OCDMA ENCODER SYSTEM
OPTICAL SWITCHING CONTROLLER USING FPGA AS A CONTROLLER FOR OCDMA ENCODER SYSTEMEditor IJCATR
 
Ccna day5-140715152501-phpapp01
Ccna day5-140715152501-phpapp01Ccna day5-140715152501-phpapp01
Ccna day5-140715152501-phpapp01Sachin Morya
 
Unit 5 ppt-idc
Unit 5 ppt-idcUnit 5 ppt-idc
Unit 5 ppt-idchiya123jes
 
477818. paper(92-97)ctts زیلایی
477818. paper(92-97)ctts زیلایی477818. paper(92-97)ctts زیلایی
477818. paper(92-97)ctts زیلاییmorteza zilaie bouri
 
Unit 4 ppt-idc
Unit 4 ppt-idcUnit 4 ppt-idc
Unit 4 ppt-idchiya123jes
 

What's hot (20)

Review on Transmission and Reception of Data through USB in VHDL
Review on Transmission and Reception of Data through USB in VHDLReview on Transmission and Reception of Data through USB in VHDL
Review on Transmission and Reception of Data through USB in VHDL
 
Design and implementation of log domain decoder
Design and implementation of log domain decoder Design and implementation of log domain decoder
Design and implementation of log domain decoder
 
MULTIPLE CHOICE QUESTIONS WITH ANSWERS ON NETWORK MANAGEMENT SYSTEMS
MULTIPLE CHOICE QUESTIONS WITH ANSWERS ON NETWORK MANAGEMENT SYSTEMSMULTIPLE CHOICE QUESTIONS WITH ANSWERS ON NETWORK MANAGEMENT SYSTEMS
MULTIPLE CHOICE QUESTIONS WITH ANSWERS ON NETWORK MANAGEMENT SYSTEMS
 
Fpga implementation of multi protocol data
Fpga implementation of multi protocol dataFpga implementation of multi protocol data
Fpga implementation of multi protocol data
 
Glossary of Technical Terms for Process Weighing
Glossary of Technical Terms for Process WeighingGlossary of Technical Terms for Process Weighing
Glossary of Technical Terms for Process Weighing
 
AN EFFICIENT VITERBI DECODER
AN EFFICIENT VITERBI DECODERAN EFFICIENT VITERBI DECODER
AN EFFICIENT VITERBI DECODER
 
VTU 6TH SEM CSE COMPUTER NETWORKS 2 SOLVED PAPERS OF JUNE-2013 JUNE-14 & JUNE...
VTU 6TH SEM CSE COMPUTER NETWORKS 2 SOLVED PAPERS OF JUNE-2013 JUNE-14 & JUNE...VTU 6TH SEM CSE COMPUTER NETWORKS 2 SOLVED PAPERS OF JUNE-2013 JUNE-14 & JUNE...
VTU 6TH SEM CSE COMPUTER NETWORKS 2 SOLVED PAPERS OF JUNE-2013 JUNE-14 & JUNE...
 
Ff34970973
Ff34970973Ff34970973
Ff34970973
 
MULTIPLE CHOICE QUESTIONS ON COMMUNICATION PROTOCOL ENGINEERING
MULTIPLE CHOICE QUESTIONS ON COMMUNICATION PROTOCOL ENGINEERINGMULTIPLE CHOICE QUESTIONS ON COMMUNICATION PROTOCOL ENGINEERING
MULTIPLE CHOICE QUESTIONS ON COMMUNICATION PROTOCOL ENGINEERING
 
Embedded real time-systems communication
Embedded real time-systems communicationEmbedded real time-systems communication
Embedded real time-systems communication
 
IRJET-Error Detection and Correction using Turbo Codes
IRJET-Error Detection and Correction using Turbo CodesIRJET-Error Detection and Correction using Turbo Codes
IRJET-Error Detection and Correction using Turbo Codes
 
H344250
H344250H344250
H344250
 
Ijetcas14 378
Ijetcas14 378Ijetcas14 378
Ijetcas14 378
 
Digital network lecturer8
Digital network  lecturer8Digital network  lecturer8
Digital network lecturer8
 
Training Report BHARAT ELECTRONICS LIMITED
Training Report BHARAT ELECTRONICS LIMITEDTraining Report BHARAT ELECTRONICS LIMITED
Training Report BHARAT ELECTRONICS LIMITED
 
OPTICAL SWITCHING CONTROLLER USING FPGA AS A CONTROLLER FOR OCDMA ENCODER SYSTEM
OPTICAL SWITCHING CONTROLLER USING FPGA AS A CONTROLLER FOR OCDMA ENCODER SYSTEMOPTICAL SWITCHING CONTROLLER USING FPGA AS A CONTROLLER FOR OCDMA ENCODER SYSTEM
OPTICAL SWITCHING CONTROLLER USING FPGA AS A CONTROLLER FOR OCDMA ENCODER SYSTEM
 
Ccna day5-140715152501-phpapp01
Ccna day5-140715152501-phpapp01Ccna day5-140715152501-phpapp01
Ccna day5-140715152501-phpapp01
 
Unit 5 ppt-idc
Unit 5 ppt-idcUnit 5 ppt-idc
Unit 5 ppt-idc
 
477818. paper(92-97)ctts زیلایی
477818. paper(92-97)ctts زیلایی477818. paper(92-97)ctts زیلایی
477818. paper(92-97)ctts زیلایی
 
Unit 4 ppt-idc
Unit 4 ppt-idcUnit 4 ppt-idc
Unit 4 ppt-idc
 

Viewers also liked

Viewers also liked (20)

Jl3417031707
Jl3417031707Jl3417031707
Jl3417031707
 
Jr3417541760
Jr3417541760Jr3417541760
Jr3417541760
 
Kk341721880
Kk341721880Kk341721880
Kk341721880
 
Ke3418281832
Ke3418281832Ke3418281832
Ke3418281832
 
Li3420552062
Li3420552062Li3420552062
Li3420552062
 
La3419751995
La3419751995La3419751995
La3419751995
 
Ki3418621868
Ki3418621868Ki3418621868
Ki3418621868
 
Jb3416441654
Jb3416441654Jb3416441654
Jb3416441654
 
Kc3418141820
Kc3418141820Kc3418141820
Kc3418141820
 
Ld3420072014
Ld3420072014Ld3420072014
Ld3420072014
 
Fq3310001010
Fq3310001010Fq3310001010
Fq3310001010
 
F33022028
F33022028F33022028
F33022028
 
Gc3111781183
Gc3111781183Gc3111781183
Gc3111781183
 
2013 · Wolder Electronics · Catálogo
2013 · Wolder Electronics · Catálogo2013 · Wolder Electronics · Catálogo
2013 · Wolder Electronics · Catálogo
 
Peixes
PeixesPeixes
Peixes
 
Catalogo Porto Rozès 2012
Catalogo Porto Rozès 2012Catalogo Porto Rozès 2012
Catalogo Porto Rozès 2012
 
diapositivas de emprendimiento
diapositivas de emprendimiento diapositivas de emprendimiento
diapositivas de emprendimiento
 
Presentación de investigación educativa
Presentación de investigación educativaPresentación de investigación educativa
Presentación de investigación educativa
 
Presentation1
Presentation1Presentation1
Presentation1
 
Ser De Direita
Ser De DireitaSer De Direita
Ser De Direita
 

Similar to Jy3717961800

Design and Implementing Novel Independent Real-Time Software Programmable DAQ...
Design and Implementing Novel Independent Real-Time Software Programmable DAQ...Design and Implementing Novel Independent Real-Time Software Programmable DAQ...
Design and Implementing Novel Independent Real-Time Software Programmable DAQ...Editor IJCATR
 
Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDL
Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDLDesign &Implementation of I2C Master Controller Interfaced With RAM Using VHDL
Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDLIJERA Editor
 
Design and Verification of the UART and SPI protocol using UVM
Design and Verification of the UART and SPI protocol using UVMDesign and Verification of the UART and SPI protocol using UVM
Design and Verification of the UART and SPI protocol using UVMIRJET Journal
 
Communication Protocols Augmentation in VLSI Design Applications
Communication Protocols Augmentation in VLSI Design ApplicationsCommunication Protocols Augmentation in VLSI Design Applications
Communication Protocols Augmentation in VLSI Design ApplicationsIJERA Editor
 
Smart as a Cryptographic Processor
Smart as a Cryptographic Processor Smart as a Cryptographic Processor
Smart as a Cryptographic Processor csandit
 
SMART AS A CRYPTOGRAPHIC PROCESSOR
SMART AS A CRYPTOGRAPHIC PROCESSORSMART AS A CRYPTOGRAPHIC PROCESSOR
SMART AS A CRYPTOGRAPHIC PROCESSORcscpconf
 
Implementation of Algorithms For Multi-Channel Digital Monitoring Receiver
Implementation of Algorithms For Multi-Channel Digital Monitoring ReceiverImplementation of Algorithms For Multi-Channel Digital Monitoring Receiver
Implementation of Algorithms For Multi-Channel Digital Monitoring ReceiverIOSR Journals
 
Hybrid Communication Protocol- UART & SPI
Hybrid Communication Protocol- UART & SPIHybrid Communication Protocol- UART & SPI
Hybrid Communication Protocol- UART & SPIHardik Manocha
 
Bhabha atomic research Centre (BARC)
Bhabha atomic research Centre (BARC)Bhabha atomic research Centre (BARC)
Bhabha atomic research Centre (BARC)Utkarsh Tiwari
 
EXIDE PPT TEMPLATE.pptx
EXIDE PPT TEMPLATE.pptxEXIDE PPT TEMPLATE.pptx
EXIDE PPT TEMPLATE.pptxNaveenK365392
 
VoCoRoBo: Remote Speech Recognition and Tilt Sensing Multi-Robotic System
VoCoRoBo: Remote Speech Recognition and Tilt Sensing Multi-Robotic SystemVoCoRoBo: Remote Speech Recognition and Tilt Sensing Multi-Robotic System
VoCoRoBo: Remote Speech Recognition and Tilt Sensing Multi-Robotic SystemSagun Man Singh Shrestha
 
Network Based Data Acquisition and Logging System using PIC Microcontroller
Network Based Data Acquisition and Logging System using PIC MicrocontrollerNetwork Based Data Acquisition and Logging System using PIC Microcontroller
Network Based Data Acquisition and Logging System using PIC MicrocontrollerCSCJournals
 
Wireless Data Acquisition System Using ARM Cortex M-3
Wireless Data Acquisition System Using ARM Cortex M-3Wireless Data Acquisition System Using ARM Cortex M-3
Wireless Data Acquisition System Using ARM Cortex M-3IOSR Journals
 
Implementation of High Speed OFDM Transceiver using FPGA
Implementation of High Speed OFDM Transceiver using FPGAImplementation of High Speed OFDM Transceiver using FPGA
Implementation of High Speed OFDM Transceiver using FPGAMangaiK4
 
Analysis of Women Harassment inVillages Using CETD Matrix Modal
Analysis of Women Harassment inVillages Using CETD Matrix ModalAnalysis of Women Harassment inVillages Using CETD Matrix Modal
Analysis of Women Harassment inVillages Using CETD Matrix ModalMangaiK4
 

Similar to Jy3717961800 (20)

M010617376
M010617376M010617376
M010617376
 
Design and Implementing Novel Independent Real-Time Software Programmable DAQ...
Design and Implementing Novel Independent Real-Time Software Programmable DAQ...Design and Implementing Novel Independent Real-Time Software Programmable DAQ...
Design and Implementing Novel Independent Real-Time Software Programmable DAQ...
 
Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDL
Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDLDesign &Implementation of I2C Master Controller Interfaced With RAM Using VHDL
Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDL
 
Design and Verification of the UART and SPI protocol using UVM
Design and Verification of the UART and SPI protocol using UVMDesign and Verification of the UART and SPI protocol using UVM
Design and Verification of the UART and SPI protocol using UVM
 
Turbo encoder and decoder chip design and FPGA device analysis for communicat...
Turbo encoder and decoder chip design and FPGA device analysis for communicat...Turbo encoder and decoder chip design and FPGA device analysis for communicat...
Turbo encoder and decoder chip design and FPGA device analysis for communicat...
 
Communication Protocols Augmentation in VLSI Design Applications
Communication Protocols Augmentation in VLSI Design ApplicationsCommunication Protocols Augmentation in VLSI Design Applications
Communication Protocols Augmentation in VLSI Design Applications
 
Smart as a Cryptographic Processor
Smart as a Cryptographic Processor Smart as a Cryptographic Processor
Smart as a Cryptographic Processor
 
SMART AS A CRYPTOGRAPHIC PROCESSOR
SMART AS A CRYPTOGRAPHIC PROCESSORSMART AS A CRYPTOGRAPHIC PROCESSOR
SMART AS A CRYPTOGRAPHIC PROCESSOR
 
Implementation of Algorithms For Multi-Channel Digital Monitoring Receiver
Implementation of Algorithms For Multi-Channel Digital Monitoring ReceiverImplementation of Algorithms For Multi-Channel Digital Monitoring Receiver
Implementation of Algorithms For Multi-Channel Digital Monitoring Receiver
 
Hybrid Communication Protocol- UART & SPI
Hybrid Communication Protocol- UART & SPIHybrid Communication Protocol- UART & SPI
Hybrid Communication Protocol- UART & SPI
 
A010240110
A010240110A010240110
A010240110
 
Bhabha atomic research Centre (BARC)
Bhabha atomic research Centre (BARC)Bhabha atomic research Centre (BARC)
Bhabha atomic research Centre (BARC)
 
EXIDE PPT TEMPLATE.pptx
EXIDE PPT TEMPLATE.pptxEXIDE PPT TEMPLATE.pptx
EXIDE PPT TEMPLATE.pptx
 
VoCoRoBo: Remote Speech Recognition and Tilt Sensing Multi-Robotic System
VoCoRoBo: Remote Speech Recognition and Tilt Sensing Multi-Robotic SystemVoCoRoBo: Remote Speech Recognition and Tilt Sensing Multi-Robotic System
VoCoRoBo: Remote Speech Recognition and Tilt Sensing Multi-Robotic System
 
A42060105
A42060105A42060105
A42060105
 
Network Based Data Acquisition and Logging System using PIC Microcontroller
Network Based Data Acquisition and Logging System using PIC MicrocontrollerNetwork Based Data Acquisition and Logging System using PIC Microcontroller
Network Based Data Acquisition and Logging System using PIC Microcontroller
 
Wireless Data Acquisition System Using ARM Cortex M-3
Wireless Data Acquisition System Using ARM Cortex M-3Wireless Data Acquisition System Using ARM Cortex M-3
Wireless Data Acquisition System Using ARM Cortex M-3
 
E010113235
E010113235E010113235
E010113235
 
Implementation of High Speed OFDM Transceiver using FPGA
Implementation of High Speed OFDM Transceiver using FPGAImplementation of High Speed OFDM Transceiver using FPGA
Implementation of High Speed OFDM Transceiver using FPGA
 
Analysis of Women Harassment inVillages Using CETD Matrix Modal
Analysis of Women Harassment inVillages Using CETD Matrix ModalAnalysis of Women Harassment inVillages Using CETD Matrix Modal
Analysis of Women Harassment inVillages Using CETD Matrix Modal
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Jy3717961800

  • 1. Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800 1796 | P a g e Implementation of Serial Communication between PC and DSP Processor Using Modbus Protocol Nagendra Sah1 , Gaurav Khurana2 1 (Sr. Asstt. Professor, Electronics and Electrical Communication Department, PEC University of Technology, Chandigarh 2 (M.E., Electronics and Electrical Communication Department, PEC University of Technology, Chandigarh ABSTRACT This paper described the principle, application and implementation of serial communication between PC and a Digital Signal Processor (DSP). The TMS320F28031 which is a type of DSPs made by Texas Instruments (TI) is used in this implementation. This DSP processor has serial communication interface (SCI) module for serial communication. The SCI is a two− wire asynchronous serial port, commonly known as a UART (Universal Asynchronous Receiver/Transmitter). The standard of Modbus protocol is implemented for this serial communication. The Modbus protocol provides an industrial standard method that Modbus devices use for parsing messages. PC (Personal Computer) can read/write one or more registers of DSP processor using Modbus communication. This paper highlights the basics of Modbus protocol and also explains the software detail of Modbus implementation. Keywords - DSP processor, Modbus protocol, UART, serial communication I. INTRODUCTION Although all the real time signals are analogue in nature but due to the huge advancement in digital signal processing, all the signals are processed in digital form. As we all know, Digital signal processing has number of advantages over analogue signal processing. To process the real time signal in digital domain, first of all we have to convert that analogue signal into digital signal using ADC (Analog to Digital Converter) and after signal processing; we have to convert digital output back into analogue form by using DAC (Digital to Analog Converter). Due to huge advancement in the field of VLSI (Very Large Scale Integration) in the past few years, there are number of digital Integrated Chips (IC’s) are available in the market for performing the above task more efficiently and accurately. These digital IC’s are commonly known as digital signal processor (DSP). DSP has been used widely in auto controller, image process, communication, network, home electrical appliances, and so on. Currently, the most widely used product come from Texas instruments (TI) which takes up almost 60 % of the market [1]. TMS320F28031 is a chip which is a product made by TI. Unlike some other chips, it uses an advanced Havard type architecture that maximizes processing power by maintaining two separate memory bus structures, one memory section for storing program and other for storing data. This will increase the program execution speed. This chip has several integrated peripherals like ADC, SCI, Timer and PWM (Pulse Width Modulator) etc. [2]. The Modbus is one of the most common serial communication protocol used in industrial application for process control. Using Modbus protocol a number of controllers and intelligent devices and communication with each other over any network. Actually Modbus protocol defines a messaging structure which is universally accepted and used. In this paper, we have established a serial communication between PC and DSP processor using Modbus protocol. The master sends a command in hexadecimal and slave responds with its response in hexadecimal too. In order to display the result, software called Modbus tester is used. Same software is also used to configure the communication parameters like communication mode, baud rate, start bits, stop bits and parity bits etc. II. HARDWARE STRUCTURE A. SCI TMS320F28031 DSP processor has an on chip serial communication interface (SCI) as one of its peripheral in its core. SCI is a two−wire asynchronous serial port and it supports digital communications between the CPU (Central Processing Unit) and other asynchronous peripherals that use the standard non-return-zero (NRZ) format. The SCI receiver and transmitter are double-buffered and each has a 4-level deep FIFO (First in First Out) for reducing servicing overhead. Both have their own separate enable and interrupt bits and both can be operated independently for half-duplex communication, or simultaneously for full duplex communication. To ensure data integrity, the SCI checks received data for break detection, parity, overrun, and framing errors. The bit rate is programmable to over 65000 different speeds through a 16-bit baud select register [3]. SCI module has two external pins for serial communication that is SCITXD (SCI transmit output
  • 2. Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800 1797 | P a g e pin) and SCIRXD (SCI receive input pin). Serial Transmission and reception operations can be accomplished through interrupt driven or polled algorithms. Here interrupt driven technique is used for communication in full duplex mode. Major elements of SCI module is shown in figure 1 and it includes: TXD pin RXD pin Fig. 1 Internal Device Structure A transmitter (TX) and its major registers (upper half of Figure 1) are: SCITXBUF register (SCI transmitter data buffer register) - it Contains data (loaded by the processor) to be transmitted to the remote PC. TXSHF register (SCI transmitter shift register) - It accepts data from register SCITXBUF and shifts data onto the SCITXD pin, one bit at a time. A receiver (RX) and its major registers (lower half of Figure 1) include: RXSHF register (SCI receiver shift register) - It shifts in the data from SCIRXD pin, one bit at a time. SCIRXBUF register (SCI receiver data buffer register) - It contains data to be read by the DSP processor. Data from a remote PC is loaded into register RXSHF and then into registers SCIRXBUF. III. MODBUS PROTOCOL The 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. Figure 2 shows the query response cycle of Modbus communication. Fig. 2 Modbus master-slave query-response cycle As shown in figure 2, master’s 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 slave’s response contains fields confirming the action taken, any data to be returned, and an error–checking field. Slave confirms the action taken by sending the echo of function code sent by the master. Table I shows the Application Data Unit (ADU) and Protocol Data Unit (PDU) of Modbus protocol. PDU is consisting of function field (1 byte) and data field (variable bytes) and ADU is consisting of address field (1 byte), PDU and error checking field (2 bytes) [4]. Table I Modbus data format Protocol data unit (PDU ) Application Data unit(ADU) 1 byte 1 byte Variable 2 bytes Address field Function field Data field Error checking 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 (Most significant Bit) of function code) to indicate that the response is an error response, and the data bytes contain a code that describes the error [5]. Some of the commonly used function codes are shown in table II. SCITXBUF Transmitter section SCIRXBUF Receiver section
  • 3. Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800 1798 | P a g e Table II List of commonly used function codes in Modbus protocol Code Name 01 Read single coil status 02 Read input status 03 Read multiple holding registers 04 Read multiple input registers 05 Write single coil 07 Read Exception Status 15 Write multiple coils 16 Write multiple registers 23 Read/Write multiple registers Modbus protocol can be established in two kinds of transmission mode: ASCII (American Standard Code for Information Interchange) mode or RTU (Remote Terminal Unit) mode. In ASCII mode, each 8–bit byte in a message is sent as two ASCII characters. In RTU mode, each 8–bit byte in a message contains two 4–bit 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 (Longitudinal Redundancy Check) and the RTU mode uses 16 CRC (Cyclical Redundancy Check). Table III is a comparison between ASCII mode and RTU mode. Table III Comparison of ASCII and RTU mode According to Table III, the data transmission rate of ASCII mode is a little lower than RTU mode. So, when need to send large data, user always uses RTU mode. The standard Modbus protocol is to use a RS- 232C compatible serial interface, which defines the port pin, cable, digital signal transmission baud rate, parity. IV. IMPLEMENTATION OF COMMUNICATION A. Configuration Setting In order to implement the Modbus protocol communication between PC and DSP processor, first of all we should configure both PC and DSP processor for the same communication mode and same baud rate that is 9600 bps (bits per second) [6]. As explained earlier, there are two modes of serial communication in Modbus protocol that is ASCII mode and RTU mode. In this implementation we have used the later one. Configuration used in this implementation is shown in table IV. Table IV PC and DSP processor communication Configuration Communication Mode Remote Terminal Unit (RTU) Baud Rate 9600 bps Data bit 8 bits Stop bit 1 bit Parity bit None Baud rate is nothing but data transfer rate which must be same at both the terminals (PC and DSP Processor). PC baud rate is configured by using Modbus communication interface software named Modbus tester and DSP processor’s baud rate is configured by using its control registers. Following formulas are in this process: Baud rate = Sysclk / (BRR+1) × 8 (1) BRR = Sysclk ( aud rate ) 1 (2) In “Eq. (1)”, the Sysclk stands for system clock frequency and the RR in “Eq. (2)” is the value of SCIHBAUD and SCILBAUD registers that you should configure. After setting the proper baud rate, the serial communication is established by using two wire communication method. Modbus protocol is master/slave protocol and communication can be initiated by master only and here PC is working as master and DSP Processor is working as slave. So PC will initiate this communication and sends a command to read DSP Processor’s 7 input registers. Each register is of 2 bytes. But data field in Modbus protocol is of 8 bits so each register is represented by two data bytes. First byte represents higher byte and second byte represents lower byte. Hence 7 register is equal to 14 bytes. Slave address is 8 bit long and it is settable. In this project, we have used only one slave and its address is 01. B. Software Flow This communication is implemented in TI tool code compose studio. Code Composer Studio™ (CCStudio) is an integrated development environment (IDE) for Texas Instruments (TI) embedded processor families. CCStudio comprises a suite of tools used to develop and debug embedded applications. Timer 0 interrupt service routine of TMS320F28031 is used in this implementation. Timer 0 is configured to generate an interrupt after every 20 microsecond. In timer 0 ISR (interrupt service routine), we check the flag bit showing the reception of data byte. If this flag bit is Mode Begi nnin g mar ks Endi ng mar ks Check Trans missio n efficien cy Progra m Process ing ASCI I : (col on) CR, LF LRC low Direct, easy to debuggi ng RTU Non Non CRC High Indirect, slightly comple x
  • 4. Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800 1799 | P a g e set, it shows that byte has been received. Then we process the received the data to extract the useful information form this data [7]. First byte is slave ID (slave address). So first of all, we compare the received byte with the address of that slave. It received byte matches with the slave ID. It means that next whole data frame is addressed to this slave and we will process the whole data frame otherwise we will ignore the whole data frame. Then we go for CRC check. It will tell about the frame validity. If frame is invalid, program will generate a response showing error in received frame using exception code. Next step is extracting the information from function code. List of commonly used function code is shown in table II. Then create the slave response according the function code. C. Read Input Registers of DSP Processor Here PC is master and will initiate the communication so it is working as transmitter and DSP Processor’s response is received by the PC [8]. The communication traffic is shown in figure 3. Fig. 3 Modbus communication traffic As shown in figure 3, TX (Transmitter) represents the command sent by PC to DSP processor and RX (Receiver) is the response sent by DSP processor to PC. Analysis of TX data is given in table V. Table V Data sent from PC to DSP Processor Code (Hex) Meaning 01 Slave Address. 04 Function code( read multiple input register) 00 Starting address of input registers(higher) 00 Starting address of input register (lower) 00 Number of registers (higher) 07 Number of registers ( lower) B1 CRC (higher) C8 CRC (lower) From table V it is clear that, PC wants to read multiple input registers of slave whose address is 01. Starting address (16 bits) of these registers is 0000h is also given by the master in its command and number register is 0007h. Last two bytes are CRC check bits for detecting the error in the transmitted code. RX is the response sent by DSP Processor to PC and analysis of Rx is given in table VI: Table VIData sent from DSP Processor to PC Code (Hex) Meaning 01 Slave Address. 04 Function code (echo of function code sent by master, as no error is detected by slave in Tx code. If slave detect some error in Tx code then it exception code which is also echo of original function code with its MSB is equal to logic 1) 0E 14 bytes(2*7 registers) in data field 00 Content of first register (higher) 00 Content of first register (lower) 00 Content of second register (higher) 96 Content of second register (lower) 00 Content of third register (higher) B9 Content of third register (lower) 00 Content of fourth register (higher) 5A Content of fourth register (lower) 00 Content of fifth register (higher) D2 Content of fifth register (lower) 00 Content of sixth register (higher) 91 Content of sixth register (lower) 00 Content of seventh register (higher) 71 Content of seventh register (lower) C2 CRC (higher) E4 CRC (lower) It is clear from table VI that, each 16 bit register is represented by two data fields each of 8 bit long. Hence content each register is shown in hexadecimal and decimal in table VII. Table VII 16 bit register content in hexadecimal and decimal format Register number Content in Hex Content in Decimal 01 0000h 00 02 0096h 150 03 00B9h 185 04 005Ah 90 05 00D2h 210 06 0091h 145 07 0071h 113
  • 5. Nagendra Sah, Gaurav Khurana / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 3, Issue 4, Jul-Aug 2013, pp.1796-1800 1800 | P a g e V. RESULTS AND DISCUSSION Results are shown in figure 4. It is clear from figure 4 that master (PC) send a command to read 7 input registers (14 bytes) of DSP processor and then DSP processor create a response message consist of 19 bytes (1 byte slave ID, 1 byte function code, 1 byte to show number of bytes in data unit (that is 14 in this example), 14 bytes of data and 2 bytes of CRC). Modbus tester software check integrity of slave response if response is found to be valid then it extract 14 byte data unit from 19 byte slave response and display the result in decimal as shown in figure 4. Fig. 4 results display in Modbus tester VI. CONCLUSION Modbus protocol is implemented and serial communication between PC and DSP Processor is established and results are displayed using Modbus tester software. Thus, we can easily interface a number of digital IC’s like DSP processors with our PC using Modbus protocol. So this communication technique can be one of well choice in industrial control applications. REFERENCES [1] Zhang Zhi-Qiang, and Zhang Yu-lin, “Realization of Communication Between DSP and PC Based on Modbus Protocol,” IEEE International Conference on Multimedia Information Networking and Security, 2009, pp. 258-261. [2] Peng D.G, Zhang H., Yang Li and Li H. “Design and Realization of Modbus Protocol ased on Embedded Linux System,” The 2008 International Conference on Embedded Software and Systems Symposia. July 29-31, 2008, Chengdu, Sichuan, China pp. 275- 280. [3] TI, TMS 320F/28031 DSP Controllers Peripheral Library and Specific Devices, Dallas: Texas Instrument, 2007, pp.56-72. [4] Zhi-Hua Chen, Min Shi, Qing-Ming Yi,”A Method for DSP asynchronous Serial port Expansion ased on TL16C752 ,” IEEE, 2011, pp. 844-847 [5] Yue Y., Zhang C.G., Yuang A.J., “Design and implementation of Embedded Man- Machine Interface ased on Modbus”. Industrial Control Computer, 2006, 19(1) pp. 8-10. [6] TI, TMS 320F/28031 DSP Controllers Peripheral Library and Specific Devices, Dallas: Texas Instrument, 2007, pp.96-102. [7] Song J, QU J P, “Realization of Communication Between PCC and Touch Screen ased on Modbus Protocol,” Electric Machine Integration, vol. II, Nov. 2007, pp. 28-73. [8] TI, TMS 320F/28031 DSP Controllers Peripheral Library and Specific Devices. Dallas: Texas Instrument, 2007, pp 176-185.