SlideShare a Scribd company logo
IOSR Journal of Electrical and Electronics Engineering (IOSR-JEEE)
e-ISSN: 2278-1676,p-ISSN: 2320-3331, Volume 10, Issue 3 Ver. I (May – Jun. 2015), PP 57-60
www.iosrjournals.org
DOI: 10.9790/1676-10315760 www.iosrjournals.org 57 | Page
Programming and communication of two dsPIC30f micro-
controller using MATLAB simulink over CAN protocol
1
Ashish Soni, 2
Prof. Jagdish Nagar
Department of Electronics & Communication Engineering, Indore. AITR Indore, (M.P.) India
Department of Electronics & Communication Engineering, Indore. AITR Indore,(M.P.) India
Abstract: In this paper, we present the development of a realtime digital system. In this system the basic
software tool is MATLAB along with Simulink, Real Time Workshop, and dspic30f Target device, and a C30
compiler. A computer – a host and a target and a compatible data acquisition board is required to provide the
interface between the software and the hardware device to be controlled (a custom development system). In this
environment, the values of any parameter (control law, inputs) in the Simulink model are easily changed on the
host in real time. Measured responses are displayed in real-time. This environment allows for experimentation,
and development of controllers for performance comparison of control laws on hardware as shown in the paper
Keywords: MATLAB, Simulink, RTW, dsPIC30f4011, Controller area network.
I. Introduction
When creating project for a new system or device, the use of MATLAB Real Time Workshop and
Embedded Coder toolboxes can be a sensible alternative to hand written C code. First, this approach allows easy
verification and test of the software before development on the target platform, by embedding the Simulink code
in a simulation environment. Additionally, this approach provides platform independence because the Simulink
code can be ported (normally without modification) to different platforms simply by use of the appropriate
Embedded Coder plug-in. The use of Simulink also aids the production of robust code compared to methods
such as hand written C code; this is particularly true for relatively inexperienced C programmers.
We have used this development process to aid in the creation of one significant real time software
projects on two different platforms. The first project is communication between two dspic30f4011 micro-
controllers using controller area network.
In this project we developed inter setup in MATLAB Simulink, in which we try to filter 3 different
parameters of digital engine using CAN protocol which is transmitted by another dsPIC30f4011 micro-
controller in MATLAB simulink module, in practical application after flashing code in hardware we
have used microchip CAN analyzer hardware for transmitting data from PC to device
Figure 1 block diagram of transmitter and reviver in MATLAB simulink model base deign
Programming and communication of two dsPIC30f micro- controller using MATLAB simulink ……
DOI: 10.9790/1676-10315760 www.iosrjournals.org 58 | Page
Figure 2 block diagram of transmitter and reviver in practical
Simulink
Simulink, developed by MathWorks, is a data flow graphical programming language tool for modeling,
simulation and analyzing multidomain dynamic systems. Its primary interface is a graphical block diagramming
tool and a customizable set of block libraries. It offers tight integration with the rest of the MATLAB
environment and can either drive MATLAB or be scripted from it. Simulink it widely used in control theory and
digital signal processing for multidomain simulation and Model based design [2].
A number of MathWorks and third-party hardware and software products are available for use with
Simulink. For example, in simulinkk we can develop state machines and flow charts with a design environment
like stateflow.
Coupled with Simulink Coder, another product from MathWorks, Simulink can automatically generate
C source code for real-time implementation of systems called RTW. As the efficiency and flexibility of the code
improves, this is becoming more widely use for production systems, in addition to being a popular tool
for embedded system design work because of its flexibility and capacity for quick iteration. Embedded
Coder creates code efficient enough for use in embedded systems [3].
RTW
Real-Time Workshop is an extension of capabilities of Simulink and MATLAB that automatically generates
packages and compiles source code from Simulink models to create real-time software applications [4-5].
 Automatic code generation tailored for different hardware platform.
 A rapid and direct path from system design to implementation
 Seamless integration with Simulink and MATLAB
 A simple graphical user interface
 Extensible make process and an open architecture and
Controller area network
Controller area network (CAN bus) is a bus standard designed to allow microcontrollers and devices to
communicate with each other in applications without a host computer. It is a message-based protocol, designed
originally for automotive systems [6].
The CAN specification defines the physical and data link layers (layers 1 and 2 in the ISO/OSI
reference model). Each CAN frame has seven fields as shown in Figure 1, but we are concerned only with the
data length (DL) and the identifier (ID) fields. The DL field is 4 bits wide and specifies the number of data bytes
in the data field, from 0 to 8. The ID field can be of two lengths: the standard format is 11-bits, whereas the
extended format is 29-bits. It controls both bus arbitration and message addressing, but we are interested only in
the former which is described next.
Programming and communication of two dsPIC30f micro- controller using MATLAB simulink ……
DOI: 10.9790/1676-10315760 www.iosrjournals.org 59 | Page
Figure 3 CAN standard frame
Table1:-Standard Frame Bit Description
Field name Length (bits) Purpose
Start-of-frame 1 Denotes the start of frame
transmission
Identifier (green) 11 A (unique) identifier for the data
which also represents the
message priority
Remote transmission request
(RTR)
1 Dominant (0) (see Remote Frame
below)
Identifier extension bit (IDE) 1 Declaring if 11 bit message ID or
29 bit message ID is used.
Dominant (0) indicate 11 bit
message ID while Recessive (1)
indicate 29 bit message.
Reserved bit (r0) 1 Reserved bit (it must be set to
dominant (0), but accepted as
either dominant or recessive)
Data length code (DLC) (yellow) 4 Number of bytes of data (0–8
bytes)[a]
Data field (red) 0-64 Data to be transmitted (length in
bytes dictated by DLC field)
CRC 15 Cyclic redundancy check
CRC delimiter 1 Must be recessive (1)
ACK slot 1 Transmitter sends
recessive (1) and any receiver
can assert a dominant (0)
ACK delimiter 1 Must be recessive (1)
End-of-frame (EOF) 7 Must be recessive (1)
Decoding algorithm generated by MATLAB simulink:-
InData1[1] = C1RX1B2 & 0b1111111100000000;
InData1[2] = C1RX1B3 & 0b0000000011111111;
InData1[1] = C1RX1B2>>8;
InData1[2] = C1RX1B3<<8;
temp = InData1[1]|InData1[2];
temp = temp/8;
Decoding algorithm is written in interpet subrutin of CAN module
Where, C1RX1B2 and C1RX1B3
16 –bit resistor for holding CAN receiver data
Programming and communication of two dsPIC30f micro- controller using MATLAB simulink ……
DOI: 10.9790/1676-10315760 www.iosrjournals.org 60 | Page
II. Observation and Result
In the figure below we can see that, after flashing C code generated by MATLAB simulink in
dsPIC30f4011 micro-controller, we got the data successfully on LCD, which is showing RPM of engine. At left
side of window we can see that transmitted EXID CF00400x with data length 8 byte is decode in dspic30f mico-
controller to get correct RPM decoding algorithm is shown above.
III. Conclusion:
The custom embedded target enables the user to generate embedded C codes from MATLAB Simulink
models and download them into the micro-controllers conveniently. From the figure we can concluded that
while using MATLAB simulink we can archive rapid C programming, which can be simulated and tested on
MATLAB simulink test bench, RTW from MATLAB simulink is also useful for programmer inexperienced in
C.
References
[1]. J. Roscoe, S. M. Blair and G. M. Burt, “Benchmarking and optimisation of Simulink code using Real-Time Workshop and
Embedded Coder for inverter and microgrid control applications”, ©2009 IEEE
[2]. http://www.tutorialspoint.com/matlab/pdf/matlab_simulink.pdf
[3]. Roberto Saco, Eduardo Pires and Carlos Godfrid, “REAL TIME CONTROLLED LABORATORY PLANT FOR CONTROL
EDUCATION”, November 6 - 9,2002 IEEE
[4]. http://dspace.cc.tut.fi/dpub/bitstream/handle/123456789/6857/yu.pdf?sequence=3
[5]. Dong Zhe, Shi Yuntao, Li Zhijun, Sun Dehui,” Design and implementation of an integrated experimental control platform using
rapid control prototyping methods”, North China University of Technology, Beijing 100144, july 25-27,2012
[6]. http://en.wikipedia.org/wiki/CAN_bus

More Related Content

What's hot

High speed customized serial protocol for IP integration on FPGA based SOC ap...
High speed customized serial protocol for IP integration on FPGA based SOC ap...High speed customized serial protocol for IP integration on FPGA based SOC ap...
High speed customized serial protocol for IP integration on FPGA based SOC ap...
IJMER
 
Di33658661
Di33658661Di33658661
Di33658661
IJERA Editor
 
5x7 matrix led display
5x7 matrix led display 5x7 matrix led display
5x7 matrix led display
Vatsal N Shah
 
Be cps-18 cps13or23-module1
Be cps-18 cps13or23-module1Be cps-18 cps13or23-module1
Be cps-18 cps13or23-module1
kavya R
 
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
Sagun Man Singh Shrestha
 
Hb3412981311
Hb3412981311Hb3412981311
Hb3412981311
IJERA Editor
 
Lightweight hamming product code based multiple bit error correction coding s...
Lightweight hamming product code based multiple bit error correction coding s...Lightweight hamming product code based multiple bit error correction coding s...
Lightweight hamming product code based multiple bit error correction coding s...
journalBEEI
 
Monitoring AC Drive by using RS485 & GSM Module
Monitoring AC Drive by using RS485 & GSM ModuleMonitoring AC Drive by using RS485 & GSM Module
Monitoring AC Drive by using RS485 & GSM Module
RSIS International
 
Combinational logic circuits
Combinational logic circuitsCombinational logic circuits
Combinational logic circuits
AswiniT3
 
scada
scadascada
scada
edzam
 
Lb35189919904
Lb35189919904Lb35189919904
Lb35189919904
IJERA Editor
 
Analysis and Implementation of Hard-Decision Viterbi Decoding In Wireless Com...
Analysis and Implementation of Hard-Decision Viterbi Decoding In Wireless Com...Analysis and Implementation of Hard-Decision Viterbi Decoding In Wireless Com...
Analysis and Implementation of Hard-Decision Viterbi Decoding In Wireless Com...
IJERA Editor
 
An Implementation and Comparison of IO Expander on Zed Board and Spartan 3E f...
An Implementation and Comparison of IO Expander on Zed Board and Spartan 3E f...An Implementation and Comparison of IO Expander on Zed Board and Spartan 3E f...
An Implementation and Comparison of IO Expander on Zed Board and Spartan 3E f...
IJEEE
 
COMMUNICATION PROTOCOL RS232 IMPLEMENTATION ON FPGA
COMMUNICATION PROTOCOL RS232 IMPLEMENTATION ON FPGACOMMUNICATION PROTOCOL RS232 IMPLEMENTATION ON FPGA
COMMUNICATION PROTOCOL RS232 IMPLEMENTATION ON FPGA
ijiert bestjournal
 
A NOVEL APPROACH FOR LOWER POWER DESIGN IN TURBO CODING SYSTEM
A NOVEL APPROACH FOR LOWER POWER DESIGN IN TURBO CODING SYSTEMA NOVEL APPROACH FOR LOWER POWER DESIGN IN TURBO CODING SYSTEM
A NOVEL APPROACH FOR LOWER POWER DESIGN IN TURBO CODING SYSTEM
VLSICS Design
 
K0216571
K0216571K0216571
K0216571
IOSR Journals
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
vtunotesbysree
 
Multiple Valued Logic for Synthesis and Simulation of Digital Circuits
Multiple Valued Logic for Synthesis and Simulation of Digital CircuitsMultiple Valued Logic for Synthesis and Simulation of Digital Circuits
Multiple Valued Logic for Synthesis and Simulation of Digital Circuits
IJERA Editor
 
Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...
TELKOMNIKA JOURNAL
 
E42032732
E42032732E42032732
E42032732
IJERA Editor
 

What's hot (20)

High speed customized serial protocol for IP integration on FPGA based SOC ap...
High speed customized serial protocol for IP integration on FPGA based SOC ap...High speed customized serial protocol for IP integration on FPGA based SOC ap...
High speed customized serial protocol for IP integration on FPGA based SOC ap...
 
Di33658661
Di33658661Di33658661
Di33658661
 
5x7 matrix led display
5x7 matrix led display 5x7 matrix led display
5x7 matrix led display
 
Be cps-18 cps13or23-module1
Be cps-18 cps13or23-module1Be cps-18 cps13or23-module1
Be cps-18 cps13or23-module1
 
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
 
Hb3412981311
Hb3412981311Hb3412981311
Hb3412981311
 
Lightweight hamming product code based multiple bit error correction coding s...
Lightweight hamming product code based multiple bit error correction coding s...Lightweight hamming product code based multiple bit error correction coding s...
Lightweight hamming product code based multiple bit error correction coding s...
 
Monitoring AC Drive by using RS485 & GSM Module
Monitoring AC Drive by using RS485 & GSM ModuleMonitoring AC Drive by using RS485 & GSM Module
Monitoring AC Drive by using RS485 & GSM Module
 
Combinational logic circuits
Combinational logic circuitsCombinational logic circuits
Combinational logic circuits
 
scada
scadascada
scada
 
Lb35189919904
Lb35189919904Lb35189919904
Lb35189919904
 
Analysis and Implementation of Hard-Decision Viterbi Decoding In Wireless Com...
Analysis and Implementation of Hard-Decision Viterbi Decoding In Wireless Com...Analysis and Implementation of Hard-Decision Viterbi Decoding In Wireless Com...
Analysis and Implementation of Hard-Decision Viterbi Decoding In Wireless Com...
 
An Implementation and Comparison of IO Expander on Zed Board and Spartan 3E f...
An Implementation and Comparison of IO Expander on Zed Board and Spartan 3E f...An Implementation and Comparison of IO Expander on Zed Board and Spartan 3E f...
An Implementation and Comparison of IO Expander on Zed Board and Spartan 3E f...
 
COMMUNICATION PROTOCOL RS232 IMPLEMENTATION ON FPGA
COMMUNICATION PROTOCOL RS232 IMPLEMENTATION ON FPGACOMMUNICATION PROTOCOL RS232 IMPLEMENTATION ON FPGA
COMMUNICATION PROTOCOL RS232 IMPLEMENTATION ON FPGA
 
A NOVEL APPROACH FOR LOWER POWER DESIGN IN TURBO CODING SYSTEM
A NOVEL APPROACH FOR LOWER POWER DESIGN IN TURBO CODING SYSTEMA NOVEL APPROACH FOR LOWER POWER DESIGN IN TURBO CODING SYSTEM
A NOVEL APPROACH FOR LOWER POWER DESIGN IN TURBO CODING SYSTEM
 
K0216571
K0216571K0216571
K0216571
 
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
VTU 4TH SEM CSE MICROPROCESSORS SOLVED PAPERS OF JUNE-2014 & JUNE-2015
 
Multiple Valued Logic for Synthesis and Simulation of Digital Circuits
Multiple Valued Logic for Synthesis and Simulation of Digital CircuitsMultiple Valued Logic for Synthesis and Simulation of Digital Circuits
Multiple Valued Logic for Synthesis and Simulation of Digital Circuits
 
Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...
 
E42032732
E42032732E42032732
E42032732
 

Viewers also liked

H017133442
H017133442H017133442
H017133442
IOSR Journals
 
Q01742112115
Q01742112115Q01742112115
Q01742112115
IOSR Journals
 
Bipolar Disorder Investigation Using Modified Logistic Ridge Estimator
Bipolar Disorder Investigation Using Modified Logistic Ridge EstimatorBipolar Disorder Investigation Using Modified Logistic Ridge Estimator
Bipolar Disorder Investigation Using Modified Logistic Ridge Estimator
IOSR Journals
 
Video Encryption and Decryption with Authentication using Artificial Neural N...
Video Encryption and Decryption with Authentication using Artificial Neural N...Video Encryption and Decryption with Authentication using Artificial Neural N...
Video Encryption and Decryption with Authentication using Artificial Neural N...
IOSR Journals
 
B012230917
B012230917B012230917
B012230917
IOSR Journals
 
B1803020915
B1803020915B1803020915
B1803020915
IOSR Journals
 
B012240612
B012240612B012240612
B012240612
IOSR Journals
 
Weyl's Theorem for Algebraically Totally K - Quasi – Paranormal Operators
Weyl's Theorem for Algebraically Totally K - Quasi – Paranormal OperatorsWeyl's Theorem for Algebraically Totally K - Quasi – Paranormal Operators
Weyl's Theorem for Algebraically Totally K - Quasi – Paranormal Operators
IOSR Journals
 
C012531118
C012531118C012531118
C012531118
IOSR Journals
 
E010224043
E010224043E010224043
E010224043
IOSR Journals
 
A010130104
A010130104A010130104
A010130104
IOSR Journals
 
N0105198107
N0105198107N0105198107
N0105198107
IOSR Journals
 
G010323739
G010323739G010323739
G010323739
IOSR Journals
 
D010521924
D010521924D010521924
D010521924
IOSR Journals
 
L017257987
L017257987L017257987
L017257987
IOSR Journals
 
C017241316
C017241316C017241316
C017241316
IOSR Journals
 
Bridgeless CUK Rectifier with Output Voltage Regulation using Fuzzy controller
Bridgeless CUK Rectifier with Output Voltage Regulation using Fuzzy controllerBridgeless CUK Rectifier with Output Voltage Regulation using Fuzzy controller
Bridgeless CUK Rectifier with Output Voltage Regulation using Fuzzy controller
IOSR Journals
 
T01231121125
T01231121125T01231121125
T01231121125
IOSR Journals
 
D017552025
D017552025D017552025
D017552025
IOSR Journals
 
Analysis of Organophosphate Pesticides Residue on Crops in Abakaliki, Ebonyi ...
Analysis of Organophosphate Pesticides Residue on Crops in Abakaliki, Ebonyi ...Analysis of Organophosphate Pesticides Residue on Crops in Abakaliki, Ebonyi ...
Analysis of Organophosphate Pesticides Residue on Crops in Abakaliki, Ebonyi ...
IOSR Journals
 

Viewers also liked (20)

H017133442
H017133442H017133442
H017133442
 
Q01742112115
Q01742112115Q01742112115
Q01742112115
 
Bipolar Disorder Investigation Using Modified Logistic Ridge Estimator
Bipolar Disorder Investigation Using Modified Logistic Ridge EstimatorBipolar Disorder Investigation Using Modified Logistic Ridge Estimator
Bipolar Disorder Investigation Using Modified Logistic Ridge Estimator
 
Video Encryption and Decryption with Authentication using Artificial Neural N...
Video Encryption and Decryption with Authentication using Artificial Neural N...Video Encryption and Decryption with Authentication using Artificial Neural N...
Video Encryption and Decryption with Authentication using Artificial Neural N...
 
B012230917
B012230917B012230917
B012230917
 
B1803020915
B1803020915B1803020915
B1803020915
 
B012240612
B012240612B012240612
B012240612
 
Weyl's Theorem for Algebraically Totally K - Quasi – Paranormal Operators
Weyl's Theorem for Algebraically Totally K - Quasi – Paranormal OperatorsWeyl's Theorem for Algebraically Totally K - Quasi – Paranormal Operators
Weyl's Theorem for Algebraically Totally K - Quasi – Paranormal Operators
 
C012531118
C012531118C012531118
C012531118
 
E010224043
E010224043E010224043
E010224043
 
A010130104
A010130104A010130104
A010130104
 
N0105198107
N0105198107N0105198107
N0105198107
 
G010323739
G010323739G010323739
G010323739
 
D010521924
D010521924D010521924
D010521924
 
L017257987
L017257987L017257987
L017257987
 
C017241316
C017241316C017241316
C017241316
 
Bridgeless CUK Rectifier with Output Voltage Regulation using Fuzzy controller
Bridgeless CUK Rectifier with Output Voltage Regulation using Fuzzy controllerBridgeless CUK Rectifier with Output Voltage Regulation using Fuzzy controller
Bridgeless CUK Rectifier with Output Voltage Regulation using Fuzzy controller
 
T01231121125
T01231121125T01231121125
T01231121125
 
D017552025
D017552025D017552025
D017552025
 
Analysis of Organophosphate Pesticides Residue on Crops in Abakaliki, Ebonyi ...
Analysis of Organophosphate Pesticides Residue on Crops in Abakaliki, Ebonyi ...Analysis of Organophosphate Pesticides Residue on Crops in Abakaliki, Ebonyi ...
Analysis of Organophosphate Pesticides Residue on Crops in Abakaliki, Ebonyi ...
 

Similar to I010315760

A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGSA STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
International Journal of Technical Research & Application
 
On-chip debugging for microprocessor design
On-chip debugging for microprocessor designOn-chip debugging for microprocessor design
On-chip debugging for microprocessor design
TELKOMNIKA JOURNAL
 
Embedded processor system for controllable period-width multichannel pulse wi...
Embedded processor system for controllable period-width multichannel pulse wi...Embedded processor system for controllable period-width multichannel pulse wi...
Embedded processor system for controllable period-width multichannel pulse wi...
TELKOMNIKA JOURNAL
 
[IJET-V1I3P17] Authors :Prof. U. R. More. S. R. Adhav
[IJET-V1I3P17] Authors :Prof. U. R. More. S. R. Adhav[IJET-V1I3P17] Authors :Prof. U. R. More. S. R. Adhav
[IJET-V1I3P17] Authors :Prof. U. R. More. S. R. Adhav
IJET - International Journal of Engineering and Techniques
 
IRJET- Navigation Camp – Bot
IRJET-  	  Navigation Camp – BotIRJET-  	  Navigation Camp – Bot
IRJET- Navigation Camp – Bot
IRJET Journal
 
Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)
Ronza Sameer
 
Design issues in cc2530 znp multi hop sensor networks
Design issues in cc2530 znp multi hop sensor networksDesign issues in cc2530 znp multi hop sensor networks
Design issues in cc2530 znp multi hop sensor networks
Sreekesh Padmanabhan
 
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
SANTIAGO PABLO ALBERTO
 
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdfA NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
SaiReddy794166
 
Design and research of CNC platform based on CAN bus
Design and research of CNC platform based on CAN busDesign and research of CNC platform based on CAN bus
Design and research of CNC platform based on CAN bus
IJRES Journal
 
Engineer new post -hangzhou wumu technology co.,ltd.The Design of Human-Mach...
Engineer new post  -hangzhou wumu technology co.,ltd.The Design of Human-Mach...Engineer new post  -hangzhou wumu technology co.,ltd.The Design of Human-Mach...
Engineer new post -hangzhou wumu technology co.,ltd.The Design of Human-Mach...
Stephanie hu
 
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
cscpconf
 
Observations of can Bus Control System
Observations of can Bus Control SystemObservations of can Bus Control System
Observations of can Bus Control System
ijtsrd
 
Sudhir tms 320 f 2812
Sudhir tms 320 f 2812 Sudhir tms 320 f 2812
Sudhir tms 320 f 2812
vijaydeepakg
 
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
 
Mobile applications using tcp (1)
Mobile applications using tcp (1)Mobile applications using tcp (1)
Mobile applications using tcp (1)
Nainita Thakkar
 
Performance Evaluation & Design Methodologies for Automated 32 Bit CRC Checki...
Performance Evaluation & Design Methodologies for Automated 32 Bit CRC Checki...Performance Evaluation & Design Methodologies for Automated 32 Bit CRC Checki...
Performance Evaluation & Design Methodologies for Automated 32 Bit CRC Checki...
VIT-AP University
 
Di33658661
Di33658661Di33658661
Di33658661
IJERA Editor
 
Jy3717961800
Jy3717961800Jy3717961800
Jy3717961800
IJERA Editor
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
IJERA Editor
 

Similar to I010315760 (20)

A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGSA STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
A STUDY OF AN ENTRENCHED SYSTEM USING INTERNET OF THINGS
 
On-chip debugging for microprocessor design
On-chip debugging for microprocessor designOn-chip debugging for microprocessor design
On-chip debugging for microprocessor design
 
Embedded processor system for controllable period-width multichannel pulse wi...
Embedded processor system for controllable period-width multichannel pulse wi...Embedded processor system for controllable period-width multichannel pulse wi...
Embedded processor system for controllable period-width multichannel pulse wi...
 
[IJET-V1I3P17] Authors :Prof. U. R. More. S. R. Adhav
[IJET-V1I3P17] Authors :Prof. U. R. More. S. R. Adhav[IJET-V1I3P17] Authors :Prof. U. R. More. S. R. Adhav
[IJET-V1I3P17] Authors :Prof. U. R. More. S. R. Adhav
 
IRJET- Navigation Camp – Bot
IRJET-  	  Navigation Camp – BotIRJET-  	  Navigation Camp – Bot
IRJET- Navigation Camp – Bot
 
Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)
 
Design issues in cc2530 znp multi hop sensor networks
Design issues in cc2530 znp multi hop sensor networksDesign issues in cc2530 znp multi hop sensor networks
Design issues in cc2530 znp multi hop sensor networks
 
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
Microcontroladores: Interfaz del microcontrolador 8051 con LCD usando el simu...
 
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdfA NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
A NETWORK-BASED DAC OPTIMIZATION PROTOTYPE SOFTWARE 2 (1).pdf
 
Design and research of CNC platform based on CAN bus
Design and research of CNC platform based on CAN busDesign and research of CNC platform based on CAN bus
Design and research of CNC platform based on CAN bus
 
Engineer new post -hangzhou wumu technology co.,ltd.The Design of Human-Mach...
Engineer new post  -hangzhou wumu technology co.,ltd.The Design of Human-Mach...Engineer new post  -hangzhou wumu technology co.,ltd.The Design of Human-Mach...
Engineer new post -hangzhou wumu technology co.,ltd.The Design of Human-Mach...
 
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
 
Observations of can Bus Control System
Observations of can Bus Control SystemObservations of can Bus Control System
Observations of can Bus Control System
 
Sudhir tms 320 f 2812
Sudhir tms 320 f 2812 Sudhir tms 320 f 2812
Sudhir tms 320 f 2812
 
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...
 
Mobile applications using tcp (1)
Mobile applications using tcp (1)Mobile applications using tcp (1)
Mobile applications using tcp (1)
 
Performance Evaluation & Design Methodologies for Automated 32 Bit CRC Checki...
Performance Evaluation & Design Methodologies for Automated 32 Bit CRC Checki...Performance Evaluation & Design Methodologies for Automated 32 Bit CRC Checki...
Performance Evaluation & Design Methodologies for Automated 32 Bit CRC Checki...
 
Di33658661
Di33658661Di33658661
Di33658661
 
Jy3717961800
Jy3717961800Jy3717961800
Jy3717961800
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
 

More from IOSR Journals

A011140104
A011140104A011140104
A011140104
IOSR Journals
 
M0111397100
M0111397100M0111397100
M0111397100
IOSR Journals
 
L011138596
L011138596L011138596
L011138596
IOSR Journals
 
K011138084
K011138084K011138084
K011138084
IOSR Journals
 
J011137479
J011137479J011137479
J011137479
IOSR Journals
 
I011136673
I011136673I011136673
I011136673
IOSR Journals
 
G011134454
G011134454G011134454
G011134454
IOSR Journals
 
H011135565
H011135565H011135565
H011135565
IOSR Journals
 
F011134043
F011134043F011134043
F011134043
IOSR Journals
 
E011133639
E011133639E011133639
E011133639
IOSR Journals
 
D011132635
D011132635D011132635
D011132635
IOSR Journals
 
C011131925
C011131925C011131925
C011131925
IOSR Journals
 
B011130918
B011130918B011130918
B011130918
IOSR Journals
 
A011130108
A011130108A011130108
A011130108
IOSR Journals
 
I011125160
I011125160I011125160
I011125160
IOSR Journals
 
H011124050
H011124050H011124050
H011124050
IOSR Journals
 
G011123539
G011123539G011123539
G011123539
IOSR Journals
 
F011123134
F011123134F011123134
F011123134
IOSR Journals
 
E011122530
E011122530E011122530
E011122530
IOSR Journals
 
D011121524
D011121524D011121524
D011121524
IOSR Journals
 

More from IOSR Journals (20)

A011140104
A011140104A011140104
A011140104
 
M0111397100
M0111397100M0111397100
M0111397100
 
L011138596
L011138596L011138596
L011138596
 
K011138084
K011138084K011138084
K011138084
 
J011137479
J011137479J011137479
J011137479
 
I011136673
I011136673I011136673
I011136673
 
G011134454
G011134454G011134454
G011134454
 
H011135565
H011135565H011135565
H011135565
 
F011134043
F011134043F011134043
F011134043
 
E011133639
E011133639E011133639
E011133639
 
D011132635
D011132635D011132635
D011132635
 
C011131925
C011131925C011131925
C011131925
 
B011130918
B011130918B011130918
B011130918
 
A011130108
A011130108A011130108
A011130108
 
I011125160
I011125160I011125160
I011125160
 
H011124050
H011124050H011124050
H011124050
 
G011123539
G011123539G011123539
G011123539
 
F011123134
F011123134F011123134
F011123134
 
E011122530
E011122530E011122530
E011122530
 
D011121524
D011121524D011121524
D011121524
 

Recently uploaded

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 

Recently uploaded (20)

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 

I010315760

  • 1. IOSR Journal of Electrical and Electronics Engineering (IOSR-JEEE) e-ISSN: 2278-1676,p-ISSN: 2320-3331, Volume 10, Issue 3 Ver. I (May – Jun. 2015), PP 57-60 www.iosrjournals.org DOI: 10.9790/1676-10315760 www.iosrjournals.org 57 | Page Programming and communication of two dsPIC30f micro- controller using MATLAB simulink over CAN protocol 1 Ashish Soni, 2 Prof. Jagdish Nagar Department of Electronics & Communication Engineering, Indore. AITR Indore, (M.P.) India Department of Electronics & Communication Engineering, Indore. AITR Indore,(M.P.) India Abstract: In this paper, we present the development of a realtime digital system. In this system the basic software tool is MATLAB along with Simulink, Real Time Workshop, and dspic30f Target device, and a C30 compiler. A computer – a host and a target and a compatible data acquisition board is required to provide the interface between the software and the hardware device to be controlled (a custom development system). In this environment, the values of any parameter (control law, inputs) in the Simulink model are easily changed on the host in real time. Measured responses are displayed in real-time. This environment allows for experimentation, and development of controllers for performance comparison of control laws on hardware as shown in the paper Keywords: MATLAB, Simulink, RTW, dsPIC30f4011, Controller area network. I. Introduction When creating project for a new system or device, the use of MATLAB Real Time Workshop and Embedded Coder toolboxes can be a sensible alternative to hand written C code. First, this approach allows easy verification and test of the software before development on the target platform, by embedding the Simulink code in a simulation environment. Additionally, this approach provides platform independence because the Simulink code can be ported (normally without modification) to different platforms simply by use of the appropriate Embedded Coder plug-in. The use of Simulink also aids the production of robust code compared to methods such as hand written C code; this is particularly true for relatively inexperienced C programmers. We have used this development process to aid in the creation of one significant real time software projects on two different platforms. The first project is communication between two dspic30f4011 micro- controllers using controller area network. In this project we developed inter setup in MATLAB Simulink, in which we try to filter 3 different parameters of digital engine using CAN protocol which is transmitted by another dsPIC30f4011 micro- controller in MATLAB simulink module, in practical application after flashing code in hardware we have used microchip CAN analyzer hardware for transmitting data from PC to device Figure 1 block diagram of transmitter and reviver in MATLAB simulink model base deign
  • 2. Programming and communication of two dsPIC30f micro- controller using MATLAB simulink …… DOI: 10.9790/1676-10315760 www.iosrjournals.org 58 | Page Figure 2 block diagram of transmitter and reviver in practical Simulink Simulink, developed by MathWorks, is a data flow graphical programming language tool for modeling, simulation and analyzing multidomain dynamic systems. Its primary interface is a graphical block diagramming tool and a customizable set of block libraries. It offers tight integration with the rest of the MATLAB environment and can either drive MATLAB or be scripted from it. Simulink it widely used in control theory and digital signal processing for multidomain simulation and Model based design [2]. A number of MathWorks and third-party hardware and software products are available for use with Simulink. For example, in simulinkk we can develop state machines and flow charts with a design environment like stateflow. Coupled with Simulink Coder, another product from MathWorks, Simulink can automatically generate C source code for real-time implementation of systems called RTW. As the efficiency and flexibility of the code improves, this is becoming more widely use for production systems, in addition to being a popular tool for embedded system design work because of its flexibility and capacity for quick iteration. Embedded Coder creates code efficient enough for use in embedded systems [3]. RTW Real-Time Workshop is an extension of capabilities of Simulink and MATLAB that automatically generates packages and compiles source code from Simulink models to create real-time software applications [4-5].  Automatic code generation tailored for different hardware platform.  A rapid and direct path from system design to implementation  Seamless integration with Simulink and MATLAB  A simple graphical user interface  Extensible make process and an open architecture and Controller area network Controller area network (CAN bus) is a bus standard designed to allow microcontrollers and devices to communicate with each other in applications without a host computer. It is a message-based protocol, designed originally for automotive systems [6]. The CAN specification defines the physical and data link layers (layers 1 and 2 in the ISO/OSI reference model). Each CAN frame has seven fields as shown in Figure 1, but we are concerned only with the data length (DL) and the identifier (ID) fields. The DL field is 4 bits wide and specifies the number of data bytes in the data field, from 0 to 8. The ID field can be of two lengths: the standard format is 11-bits, whereas the extended format is 29-bits. It controls both bus arbitration and message addressing, but we are interested only in the former which is described next.
  • 3. Programming and communication of two dsPIC30f micro- controller using MATLAB simulink …… DOI: 10.9790/1676-10315760 www.iosrjournals.org 59 | Page Figure 3 CAN standard frame Table1:-Standard Frame Bit Description Field name Length (bits) Purpose Start-of-frame 1 Denotes the start of frame transmission Identifier (green) 11 A (unique) identifier for the data which also represents the message priority Remote transmission request (RTR) 1 Dominant (0) (see Remote Frame below) Identifier extension bit (IDE) 1 Declaring if 11 bit message ID or 29 bit message ID is used. Dominant (0) indicate 11 bit message ID while Recessive (1) indicate 29 bit message. Reserved bit (r0) 1 Reserved bit (it must be set to dominant (0), but accepted as either dominant or recessive) Data length code (DLC) (yellow) 4 Number of bytes of data (0–8 bytes)[a] Data field (red) 0-64 Data to be transmitted (length in bytes dictated by DLC field) CRC 15 Cyclic redundancy check CRC delimiter 1 Must be recessive (1) ACK slot 1 Transmitter sends recessive (1) and any receiver can assert a dominant (0) ACK delimiter 1 Must be recessive (1) End-of-frame (EOF) 7 Must be recessive (1) Decoding algorithm generated by MATLAB simulink:- InData1[1] = C1RX1B2 & 0b1111111100000000; InData1[2] = C1RX1B3 & 0b0000000011111111; InData1[1] = C1RX1B2>>8; InData1[2] = C1RX1B3<<8; temp = InData1[1]|InData1[2]; temp = temp/8; Decoding algorithm is written in interpet subrutin of CAN module Where, C1RX1B2 and C1RX1B3 16 –bit resistor for holding CAN receiver data
  • 4. Programming and communication of two dsPIC30f micro- controller using MATLAB simulink …… DOI: 10.9790/1676-10315760 www.iosrjournals.org 60 | Page II. Observation and Result In the figure below we can see that, after flashing C code generated by MATLAB simulink in dsPIC30f4011 micro-controller, we got the data successfully on LCD, which is showing RPM of engine. At left side of window we can see that transmitted EXID CF00400x with data length 8 byte is decode in dspic30f mico- controller to get correct RPM decoding algorithm is shown above. III. Conclusion: The custom embedded target enables the user to generate embedded C codes from MATLAB Simulink models and download them into the micro-controllers conveniently. From the figure we can concluded that while using MATLAB simulink we can archive rapid C programming, which can be simulated and tested on MATLAB simulink test bench, RTW from MATLAB simulink is also useful for programmer inexperienced in C. References [1]. J. Roscoe, S. M. Blair and G. M. Burt, “Benchmarking and optimisation of Simulink code using Real-Time Workshop and Embedded Coder for inverter and microgrid control applications”, ©2009 IEEE [2]. http://www.tutorialspoint.com/matlab/pdf/matlab_simulink.pdf [3]. Roberto Saco, Eduardo Pires and Carlos Godfrid, “REAL TIME CONTROLLED LABORATORY PLANT FOR CONTROL EDUCATION”, November 6 - 9,2002 IEEE [4]. http://dspace.cc.tut.fi/dpub/bitstream/handle/123456789/6857/yu.pdf?sequence=3 [5]. Dong Zhe, Shi Yuntao, Li Zhijun, Sun Dehui,” Design and implementation of an integrated experimental control platform using rapid control prototyping methods”, North China University of Technology, Beijing 100144, july 25-27,2012 [6]. http://en.wikipedia.org/wiki/CAN_bus