You are on page 1of 63

INTRODUCTORY CONCEPTS

OBJECTIVE:
•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 DEFINITION
Electronic equipment with Embedded chips
in built
or
Micro Computer based System with intelligence
embedded in built through program
MEMORY UNIT

CPU
ALU

INPUT UNIT OUTPUTUNIT


CONTROL
UNIT

GENERIC MICROCOMPUTER
ARCHITECTURE
WHAT IS MICROPROCESSOR?

CPU in a Single Chip


WHAT IS MICROCONTROLLER?

= Single Chip Micro Computer


Embedded Product Development
Life Cycle
Understand
User Requirements

Analyze the requirements


choose right Embedded chips

Choose Programming Developing


Language Algorithm PCB Layout
HLL/ ASS to solve Design
problem
A
B
A B

Coding, Editing
Compiling/ PCB Layout
Assembling Procurement

Debugging Assemble
Component

Testing Using Test


Simulator Hardware
Down Loading
Program
D E
C
D C E

NOT O.K Test S/Won Hardware


Using ICE
NOT O.K

O.K

Finished
Embedded
System
Embedded Tools
•Cross Assembler / Compiler Linker
• Debugger
• Simulator
• In Circuit Emulator
DSCOPE SIMULATOR
In Circuit Emulator
In Circuit Emulator (Contd..)
How Embedded System
Communicate to external World?
•Via Input/Output ports

Input/Output Ports

Parallel Serial
PARALLEL INPUT/OUTPUT PORTS

Embedded 1 byte at a
System time
Example for Parallel
Communication

Parallel Input/Output
Advantage and disadvantage of
parallel communication
Advantages Disadvantages
* Data transfer rate is * More number of wires,
high. not suitable for larger
distance communication
NOTE:
Most of Embedded system has both
* parallel- used between on board
peripherals
* serial- used for larger distance
SERIAL COMMUNICATION

Transmitter Receiver

* Signal will be carried one bit at a time


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
• Synchronous

• Asynchronous
Format Synchronous Asynchronous

Data Format Group of One character


Character at a time
Speed High Less than 64
(64Kb/s or Kb/s
higher)
Implementation Hardware Hardware
(or ) Software
Data Direction
• Simplex
• Half duplex
• Full duplex

Simplex:
* Data flow only in one direction
e.g. T.V broadcasting, PC to printer
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)

START STOP
DATA PARITY
Error Checking
Sources of error:-

• Noise induced in Transmission media


• Differences in Ground levels, etc….

Techniques of Check Errors

1. Parity Checking
2. Checksum (or) Longitudinal Redundancy check
(LRC)
3.Cyclical Redundancy Check(CRC)
Data Speed
Unit: Baud

How we will define Baud rate?

The number of bits per second

example:-
If baud rate of modem is 2400, then 2400 bits are
transmitted per second.
Transmission Medium

• Telephone Line

• Co-Axial cable

• Twisted Pair cable

• Fiber Optics
PROTOCOL
The rules that governs the transmission of data
between two system.

Example :- Modbus -Modicon


Data High way Plus -Allen Bradley
HART -Rosemount
TCP/IP
EIA RS 232 C Standards
What is the Abbreviation of EIA?

Electronic Industry Association

What is the RS in RS232 stands for?

Recommended Standard
What this standard specifies?
Electrical - Common Voltage and Signal Levels

Mechanical - Common Pin Wiring Configuration

Functional - A Minimal amount of Control


information between the Host and peripheral
Systems
Electrical Signal
Specification

• -3V to -15V is defined as logic ‘1’


• +3V to +15V is defined as Logic ‘0’
Mechanical Specification
RS-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 Female housing
with 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.
A Typical RS232 Connection
DTE DCE
2 TD 2
3 RD 3
4 RTS 4
5 CTS 5
6 DSR 6
7 COMMON 7
8 DCD 8
20 DTR 20
22 RI 22
RS232
Minimum Connection Required

Null Modem Connection

TXD TXD

DTE Embedded
PC System
RXD RXD
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 conductor


can 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


R R

1 2 32

• Twisted pair cable is commonly used


OSI REFERENCE MODEL
- 7 Layer Architecture
HOST A HOST B

APPLICATION APPLICATION

PRESENTATION PRESENTATION

SESSION SESSION

TRANSPORT TRANSPORT

NETWORK NETWORK

DATA LINK DATA LINK

PHYSICAL PHYSICAL
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

Defines

• Routing of Message across different Networks


Transport Layer
Defines
• Ensures one host end to remote host
communication

• Acknowledgement of message

• Retransmitting message
Session Layer
Defines
• Start and stop of communication

Presentation Layer

Defines
• Translates Application Message Format
suitable to communicate system
Application Layer
Defines

• It is part of Application protocol


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 respond


to the Master's QUERY

• Two Modes of operation


ASCII
RTU
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 Bit
7 Data Bits
1 bit for Odd/Even parity, no bit for no parity
1 Stop bit,if parity is used, 2 bits if no parity is used
A Typical a Network
Maintenance

Control / Monitoring
Control / Monitoring Churning Room Control / Monitoring
Cream preparation Room Butter packing By-products manufacturing

Control / Monitoring PC / GEM


Milk preparation Room

PC-Vue

PC-Vue PC-Vue PC-Vue

Modbus
Modbus

BM 85 M 984 M 984 M 984 M 984 M 984

Milk skimming Maturing Ferments preparation Churning Evaporator # 2


CIP Cream preparation Scraper Butter packing By-products dry concentration
M 984 Pasteurizing Butter making CIP

Decantation
Milk storage
Evaporator # 1

Milk preparation Cream preparation Butter By-products


Error Checking

Longitudinal Redundancy Check(LRC)

Example:

To transmit 38h Hexadecimal character,follows ODD


parity

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

Functi LRC
Start Address Data END
on Check
1 2 2 # 2
CHAR CHAR CHAR CHAR 1
CHAR
• CHAR
• CRLF
RESPONSE

Functi Byte LRC


Start Address Data END
on Count Check
1 2 2 # # 2
1
CHAR CHAR CHAR CHAR CHAR CHAR
CHAR
RTU MODE
Coding:

• 8 bit binary, contains Hexadecimal number


system 0….9,A……F

Bits/Byte:

1 Start Bit
8 Data Bits
1 bit for Odd/Even parity, no bit for no parity
1 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,follows


No parity
Start 0 0 0 1 1 1 0 0 Stop 38h
Message Frame - RTU
QUERY

Functi CRC
Start Address Data END
on Check

T1-T2-T3-T4 # 16 T1-T2-T3-T4
8 8
8 BITS
BITS BITS
BITS
RESPONSE

Functi Byte CRC


Start Address Data END
on Count Check
# # 16 T1-T2-T3-T4
8 8
T1-T2-T3-T4 8 8 BITS
BITS BITS
BITS BITS

You might also like