+ All Categories
Home > Documents > Embedded Concepts

Embedded Concepts

Date post: 14-Nov-2014
Category:
Upload: shirish-jadhav
View: 9 times
Download: 0 times
Share this document with a friend
63
INTRODUCTORY CONCEPTS OBJECTIVE: •What is Embedded System? •Microprocessor Vs Microcontroll •Embedded product Development cy •Embedded tools Overview
Transcript
Page 1: Embedded Concepts

INTRODUCTORY CONCEPTSOBJECTIVE:

•What is Embedded System?

•Microprocessor Vs Microcontroller

•Embedded product Development cycle

•Embedded tools Overview

Page 2: Embedded Concepts

OBJECTIVE (Contd...)

• How Embedded System communicate to external world?

• Serial communication basics

Page 3: Embedded Concepts

WHAT IS EMBEDDED SYSTEMS?

Page 4: Embedded Concepts

GENERAL DEFINITION

Electronic equipment with

* In built intelligence

* Uses Dedicated Software

* Often no “real” keyboard

* Often limited display

But, Every system is unique….

Page 5: Embedded Concepts

TECHNICAL DEFINITIONElectronic equipment with Embedded chips in built

or

Micro Computer based System with intelligence embedded in built through program

Page 6: Embedded Concepts

GENERIC MICROCOMPUTERARCHITECTURE

INPUT UNIT

MEMORY UNIT

ALU

CONTROLUNIT

OUTPUTUNIT

CPU

Page 7: Embedded Concepts

CPU in a Single Chip

WHAT IS MICROPROCESSOR?

Page 8: Embedded Concepts

WHAT IS MICROCONTROLLER?

= Single Chip Micro Computer

Page 9: Embedded Concepts

Embedded Product Development Life Cycle

UnderstandUser Requirements

Analyze the requirements choose right Embedded chips

Choose ProgrammingLanguageHLL/ ASS

DevelopingAlgorithm

to solveproblem

PCB LayoutDesign

AB

Page 10: Embedded Concepts

Debugging

Testing UsingSimulator

CD

A

Coding, EditingCompiling/Assembling

Down LoadingProgram

PCB LayoutProcurement

Assemble Component

Test Hardware

B

E

Page 11: Embedded Concepts

Test S/Won HardwareUsing ICE

Finished Embedded

System

CD E

O.K

NOT O.KNOT O.K

Page 12: Embedded Concepts

Embedded Tools

•Cross Assembler / Compiler Linker • Debugger• Simulator• In Circuit Emulator

Page 13: Embedded Concepts

DSCOPE SIMULATOR

Page 14: Embedded Concepts

In Circuit Emulator

Page 15: Embedded Concepts

In Circuit Emulator (Contd..)

Page 16: Embedded Concepts

Input/Output Ports

Parallel Serial

How Embedded System Communicate to external World?

•Via Input/Output ports

Page 17: Embedded Concepts

EmbeddedSystem

1 byte at a time

PARALLEL INPUT/OUTPUT PORTS

Page 18: Embedded Concepts

Example for Parallel Communication

Parallel Input/Output

Page 19: Embedded Concepts

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

Page 20: Embedded Concepts

SERIAL COMMUNICATION

* Signal will be carried one bit at a time

Transmitter Receiver

Page 21: Embedded Concepts

Example for serial communication

Page 22: Embedded Concepts

Parameters to be considered for Serial Communication

• Synchronization

• Direction of DATA flow

• Framing

• Data speed

• Error checking

• Transmission medium

• Protocol

Page 23: Embedded Concepts

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

Page 24: Embedded Concepts

• Simplex• Half duplex• Full duplex

Simplex: * Data flow only in one direction

e.g. T.V broadcasting, PC to printer

Data Direction

Page 25: Embedded Concepts

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

Page 26: Embedded Concepts

Framing

• Start bit(s)

• Data bit(s)

• Parity bit(s)

• Stop bit(s)

STARTDATA PARITY

STOP

Page 27: Embedded Concepts

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)

Page 28: Embedded Concepts

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

Page 29: Embedded Concepts

Transmission Medium

• Telephone Line

• Co-Axial cable

• Twisted Pair cable

• Fiber Optics

Page 30: Embedded Concepts

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.

Page 31: Embedded Concepts

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

Page 32: Embedded Concepts

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?

Page 33: Embedded Concepts

Electrical Signal Specification

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

• +3V to +15V is defined as Logic ‘0’

Page 34: Embedded Concepts

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.

Page 35: Embedded Concepts
Page 36: Embedded Concepts
Page 37: Embedded Concepts

TDRD

RTSCTS

DSRCOMMON

DCDDTR

RI

2345

6

7

8

2022

23

5

6

7

8

2022

4

DTE DCE

A Typical RS232 Connection

Page 38: Embedded Concepts

DTEPC

EmbeddedSystem

TXD TXD

RXD RXD

RS232Minimum Connection Required

Null Modem Connection

Page 39: Embedded Concepts
Page 40: Embedded Concepts

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

Page 41: Embedded Concepts

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

Page 42: Embedded Concepts

RS 485 Standard (Contd..)

• supports 32 Devices

• operates at 5v

• Maximum Speed is 10 Mbps

• Twisted pair cable is commonly used

Page 43: Embedded Concepts

1 2 32

R R

• Twisted pair cable is commonly used

Page 44: Embedded Concepts

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

Page 45: Embedded Concepts

Physical Layer

Defines

• Electrical

• Mechanical characteristics of I/F to medium

• Data rate

• Modulation Demodulation techniques

Page 46: Embedded Concepts

Data Link Layer

Defines

• Medium Access Control

• Structures transmission

• Error checking and error -correction

Page 47: Embedded Concepts

Network Layer

• Routing of Message across different Networks

Defines

Page 48: Embedded Concepts

Defines

Transport Layer

• Ensures one host end to remote host communication

• Acknowledgement of message

• Retransmitting message

Page 49: Embedded Concepts

Session Layer

Defines

• Start and stop of communication

Presentation Layer

• Translates Application Message Format suitable to communicate system

Defines

Page 50: Embedded Concepts

Application Layer

• It is part of Application protocol

Defines

Page 51: Embedded Concepts

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

Page 52: Embedded Concepts

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

Page 53: Embedded Concepts

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

Page 54: Embedded Concepts

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

Page 55: Embedded Concepts

Message Frame - ASCII

QUERY

Start AddressFuncti

onData

LRCCheck

END

1CHAR

• •

2 CHAR

2 CHAR

#CHAR

2 CHAR 1

CHARCRLF

Page 56: Embedded Concepts

Start AddressFuncti

onByte

CountData

LRCCheck

END

1CHAR

2 CHAR

2 CHAR

#CHAR

#CHAR

2 CHAR

RESPONSE

1CHAR

Page 57: Embedded Concepts

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

Page 58: Embedded Concepts

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

Page 59: Embedded Concepts

QUERY

Start AddressFuncti

onData

CRCCheck

END

T1-T2-T3-T4 8BITS

8BITS

#8

BITS

16BITS

T1-T2-T3-T4

Message Frame - RTU

Page 60: Embedded Concepts

Start AddressFuncti

onByte

CountData

CRCCheck

END

T1-T2-T3-T4 8BITS

8BITS

#8

BITS

16BITS

T1-T2-T3-T4#8

BITS

RESPONSE

Page 61: Embedded Concepts
Page 62: Embedded Concepts
Page 63: Embedded Concepts

Recommended