Date post: | 14-Nov-2014 |
Category: |
Documents |
Upload: | shirish-jadhav |
View: | 9 times |
Download: | 0 times |
INTRODUCTORY CONCEPTSOBJECTIVE:
•What is Embedded System?
•Microprocessor Vs Microcontroller
•Embedded product Development cycle
•Embedded tools Overview
OBJECTIVE (Contd...)
• How Embedded System communicate to external world?
• Serial communication basics
WHAT IS EMBEDDED SYSTEMS?
GENERAL DEFINITION
Electronic equipment with
* In built intelligence
* Uses Dedicated Software
* Often no “real” keyboard
* Often limited display
But, Every system is unique….
TECHNICAL DEFINITIONElectronic equipment with Embedded chips in built
or
Micro Computer based System with intelligence embedded in built through program
GENERIC MICROCOMPUTERARCHITECTURE
INPUT UNIT
MEMORY UNIT
ALU
CONTROLUNIT
OUTPUTUNIT
CPU
CPU in a Single Chip
WHAT IS MICROPROCESSOR?
WHAT IS MICROCONTROLLER?
= Single Chip Micro Computer
Embedded Product Development Life Cycle
UnderstandUser Requirements
Analyze the requirements choose right Embedded chips
Choose ProgrammingLanguageHLL/ ASS
DevelopingAlgorithm
to solveproblem
PCB LayoutDesign
AB
Debugging
Testing UsingSimulator
CD
A
Coding, EditingCompiling/Assembling
Down LoadingProgram
PCB LayoutProcurement
Assemble Component
Test Hardware
B
E
Test S/Won HardwareUsing ICE
Finished Embedded
System
CD E
O.K
NOT O.KNOT O.K
Embedded Tools
•Cross Assembler / Compiler Linker • Debugger• Simulator• In Circuit Emulator
DSCOPE SIMULATOR
In Circuit Emulator
In Circuit Emulator (Contd..)
Input/Output Ports
Parallel Serial
How Embedded System Communicate to external World?
•Via Input/Output ports
EmbeddedSystem
1 byte at a time
PARALLEL INPUT/OUTPUT PORTS
Example for Parallel Communication
Parallel Input/Output
Advantage and disadvantage of parallel communication
Advantages Disadvantages* Data transfer rate is high.
* More number of wires, not suitable for larger distance communication
NOTE: Most of Embedded system has both
* parallel- used between on board peripherals* serial- used for larger distance communication
SERIAL COMMUNICATION
* Signal will be carried one bit at a time
Transmitter Receiver
Example for serial communication
Parameters to be considered for Serial Communication
• Synchronization
• Direction of DATA flow
• Framing
• Data speed
• Error checking
• Transmission medium
• Protocol
Synchronisation
Format Synchronous Asynchronous
Data Format Group ofCharacter
One characterat a time
Speed High(64Kb/s orhigher)
Less than 64Kb/s
Implementation Hardware Hardware(or ) Software
• Synchronous
• Asynchronous
• Simplex• Half duplex• Full duplex
Simplex: * Data flow only in one direction
e.g. T.V broadcasting, PC to printer
Data Direction
Half duplex:Two way communication, but data flow
only in one direction at a time.E.g. Walkie-Talkie
Full duplex:Two way communication simultaneously.
E.g.Telephone
Framing
• Start bit(s)
• Data bit(s)
• Parity bit(s)
• Stop bit(s)
STARTDATA PARITY
STOP
Error Checking
Sources of error:-
• Noise induced in Transmission media
• Differences in Ground levels, etc….
Techniques of Check Errors
1. Parity Checking2. Checksum (or) Longitudinal Redundancy check
(LRC)3.Cyclical Redundancy Check(CRC)
example:-
If baud rate of modem is 2400, then 2400 bits are transmitted per second.
Data Speed
Unit: Baud
How we will define Baud rate?
The number of bits per second
Transmission Medium
• Telephone Line
• Co-Axial cable
• Twisted Pair cable
• Fiber Optics
Example :- Modbus -Modicon
Data High way Plus -Allen Bradley
HART -Rosemount
TCP/IP
PROTOCOL
The rules that governs the transmission of data between two system.
EIA RS 232 C Standards
What is the Abbreviation of EIA?
Electronic Industry AssociationElectronic Industry Association
What is the RS in RS232 stands for?
Recommended StandardRecommended Standard
Electrical - Common Voltage and Signal Levels
Mechanical - Common Pin Wiring Configuration
Functional - A Minimal amount of Control
information between the Host and peripheral
Systems
What this standard specifies?What this standard specifies?
Electrical Signal Specification
• -3V to -15V is defined as logic ‘1’
• +3V to +15V is defined as Logic ‘0’
Mechanical SpecificationRS-232 specifies a 25-pin connector.
The connector for DCE is Male for the connector housing and Female for the connection pins.
The connector for DTE is a FemaleFemale housing with male male connection pins.
Most of the applications (including modems) use only a 9-pin connector with the minimum required signals as shown in the figure next.
TDRD
RTSCTS
DSRCOMMON
DCDDTR
RI
2345
6
7
8
2022
23
5
6
7
8
2022
4
DTE DCE
A Typical RS232 Connection
DTEPC
EmbeddedSystem
TXD TXD
RXD RXD
RS232Minimum Connection Required
Null Modem Connection
Disadvantages of RS232
• Maximum Distance is only 50 feet
• Maximum Speed 115Kbps
• Multiple Device connectivity not supported
• More number of wires
• Non-Standard Voltage levels
RS 485 Serial Communication Standard
This standard specifies only Electrical specification
• Only two wires are needed
• Operates in Differential mode
• The potential difference between two conductorcan be maximum of 2.5v
RS 485 Standard (Contd..)
• supports 32 Devices
• operates at 5v
• Maximum Speed is 10 Mbps
• Twisted pair cable is commonly used
1 2 32
R R
• Twisted pair cable is commonly used
PHYSICAL PHYSICAL
DATA LINK
NETWORK
TRANSPORT
SESSION
DATA LINK
NETWORK
TRANSPORT
SESSION
HOST A HOST B
PRESENTATION
APPLICATION
PRESENTATION
APPLICATION
OSI REFERENCE MODEL- 7 Layer Architecture
Physical Layer
Defines
• Electrical
• Mechanical characteristics of I/F to medium
• Data rate
• Modulation Demodulation techniques
Data Link Layer
Defines
• Medium Access Control
• Structures transmission
• Error checking and error -correction
Network Layer
• Routing of Message across different Networks
Defines
Defines
Transport Layer
• Ensures one host end to remote host communication
• Acknowledgement of message
• Retransmitting message
Session Layer
Defines
• Start and stop of communication
Presentation Layer
• Translates Application Message Format suitable to communicate system
Defines
Application Layer
• It is part of Application protocol
Defines
MODBUS PROTOCOL
• Follows Master- Slave Comm Architecture
• Only one device(i.e Master) can initiate transaction called QUERY
• The addressed device(i.e Slave) will respondto the Master's QUERY
• Two Modes of operationASCIIRTU
ASCII Mode(American Standard Code for Information Interchange)
Coding:
• Hexadecimal 0…….9,A…..F• Each Hexadecimal Character is represented in •equivalent ASCII
Bits/Byte:
1 Start Bit7 Data Bits1 bit for Odd/Even parity, no bit for no parity1 Stop bit,if parity is used, 2 bits if no parity is used
Modbus
M 984M 984 M 984M 984 M 984
M 984
PC-VuePC-VuePC-Vue
PC / GEM
PC-Vue
BM 85
DecantationMilk storage
Evaporator # 1
Mod
bus
Milk skimmingCIP
Pasteurizing
MaturingCream preparation
Butter making
Ferments preparationScraper
ChurningButter packing
CIP
Evaporator # 2By-products dry concentration
Maintenance
Control / MonitoringCream preparation Room
Control / MonitoringChurning RoomButter packing
Control / MonitoringBy-products manufacturing
Control / MonitoringMilk preparation Room
Butter By-productsCream preparationMilk preparation
A Typical a Network
Error Checking
Longitudinal Redundancy Check(LRC)
Example:
To transmit 38h Hexadecimal character,follows ODDparity
Start 0 0 0 1 1 1 0 0 Stop =ASCII 8h
Start 1 1 0 0 1 1 0 1 Stop =ASCII 3h
Message Frame - ASCII
QUERY
Start AddressFuncti
onData
LRCCheck
END
1CHAR
• •
2 CHAR
2 CHAR
#CHAR
2 CHAR 1
CHARCRLF
Start AddressFuncti
onByte
CountData
LRCCheck
END
1CHAR
2 CHAR
2 CHAR
#CHAR
#CHAR
2 CHAR
RESPONSE
1CHAR
RTU MODE
Coding:
• 8 bit binary, contains Hexadecimal number system 0….9,A……F
Bits/Byte:
1 Start Bit8 Data Bits1 bit for Odd/Even parity, no bit for no parity1 Stop bit, if parity is used,2 bits if no parity is used
Error Checking:Cyclical Redundancy Check(CRC)
Example:
To transmit 38 h Hexadecimal character,followsNo parity
Start 0 0 0 1 1 1 0 0 Stop 38h
QUERY
Start AddressFuncti
onData
CRCCheck
END
T1-T2-T3-T4 8BITS
8BITS
#8
BITS
16BITS
T1-T2-T3-T4
Message Frame - RTU
Start AddressFuncti
onByte
CountData
CRCCheck
END
T1-T2-T3-T4 8BITS
8BITS
#8
BITS
16BITS
T1-T2-T3-T4#8
BITS
RESPONSE