Ch 7. Network Interface

Similar documents
WPAN-like Systems. UWB Ultra Wide Band. IrDA Infrared Data Association. Bluetooth. Z-Wave. WPAN Wireless Personal Area Network

Interfacing. Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis

The House Intelligent Switch Control Network based On CAN bus

Guide to Wireless Communications, 3 rd Edition. Objectives

Workshop on In Vehicle Network using CAN By

Controller area network

Serial Buses in Industrial and Automotive Applications

Controller Area Network

Digital Circuits Part 2 - Communication

Today. Last Time. Motivation. CAN Bus. More about CAN. What is CAN?

Objectives. Learn how computers are connected. Become familiar with different types of transmission media

Wireless# Guide to Wireless Communications. Objectives

Growing Together Globally Serial Communication Design In Embedded System

By Ambuj Varshney & Akshat Logar

Communication Networks for the Next-Generation Vehicles

Additional Slides (informative)

or between microcontrollers)

WIRELESS SENSOR NETWORK

Guide to Wireless Communications, Third Edition. Objectives

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Course Introduction. Purpose. Objectives. Content. Learning Time

A smart Home Security system based on ARM9

Embedded Systems. 8. Communication

Introduction to Wireless Networking ECE 401WN Spring 2009

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

The MAC Address Format

Lecture 23 Overview. Last Lecture. This Lecture. Next Lecture ADSL, ATM. Wireless Technologies (1) Source: chapters 6.2, 15

Introduction. 1.1 Industrial Wireless Communication Products P1-1-1

An Introduction to CAN by Peter Bagschik (I+ME ACTIA)

Computer Networks. Wireless LANs

EE414 Embedded Systems Ch 5. Memory Part 2/2

Introduction to Information Technology Turban, Rainer and Potter John Wiley & Sons, Inc. Copyright 2005

Data Link Layer Technologies

Announcements / Wireless Networks and Applications Lecture 9: Wireless LANs Wireless. Regular Ethernet CSMA/CD.

CS 455/555 Intro to Networks and Communications. Link Layer

Digital communication technology for teaching automatic control: the level control case

Links. CS125 - mylinks 1 1/22/14

EE 122: Ethernet and

CS263: Wireless Communications and Sensor Networks

Data Communication. Introduction of Communication. Data Communication. Elements of Data Communication (Communication Model)

Introduction to Controller Area Network (CAN)

Wireless# Guide to Wireless Communications. Objectives

ITP 140 Mobile Applications Technologies. Networks

Wireless Personal Area Networks & Wide Area Networks

Data Communications. Data Link Layer Protocols Wireless LANs

The Link Layer and LANs. Chapter 6: Link layer and LANs

The Controller Area Network (CAN) Interface

Wireless LANs. The Protocol Stack The Physical Layer The MAC Sublayer Protocol The Frame Structure Services 802.

Naveen Kumar. 1 Wi-Fi Technology

Seminar: Mobile Systems. Krzysztof Dabkowski Supervisor: Fabio Hecht

Amarjeet Singh. February 7, 2012

Controller Area Network (CAN)

CCNA Exploration1 Chapter 7: OSI Data Link Layer

Wireless Connectivity Options for IoT. By: MIST Makers John Varela and Nicholas Landy

WiFi Networks: IEEE b Wireless LANs. Carey Williamson Department of Computer Science University of Calgary Winter 2018

Mobile Communications Chapter 7: Wireless LANs

AT THE END OF THIS SECTION, YOU SHOULD HAVE AN UNDERSTANDING OF THE

Modulation. Propagation. Typical frequency bands

Chapter 10: Wireless LAN & VLANs

Wireless Technologies

Embedded Systems Design: A Unified Hardware/Software Introduction. Chapter 6 Interfacing

Chapter 5 Link Layer and LANs

Lecture 6. Reminder: Homework 2, Programming Project 2 due on Thursday. Questions? Tuesday, September 13 CS 475 Networks - Lecture 6 1

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

Chapter 6 The Link Layer and LANs

Summary of MAC protocols

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

Medium Access Protocols

Wireless Networking. Chapter The McGraw-Hill Companies, Inc. All rights reserved

Ethernet. Lecture 6. Outline. Ethernet - Physical Properties. Ethernet - Physical Properties. Ethernet

A COLLOCATED APPROACH FOR COEXISTENCE RESOLUTION IN WIRELESS HOME NETWORKING

Case study of Wireless Technologies in Industrial Applications

ENSC 427: COMMUNICATION NETWORKS

Sri Vidya College of Engineering and Technology. EC6703 Embedded and Real Time Systems Unit IV Page 1.

WIRELESS-NETWORK TECHNOLOGIES/PROTOCOLS

Come & Join Us at VUSTUDENTS.net

Chapter 3.1 Acknowledgment:

CCNA 1 Capítulo 8 OSI Physical Layer. 2004, Cisco Systems, Inc. All rights reserved.

CAN-FD Flexible Data Rate CAN

Learning Objectives. Introduction. Advantages of WLAN. Information Technology. Mobile Computing. Module: Wireless Local Area Network: IEEE 802.

Jeffrey Price Dr. Konak IST 220 Bluetooth Technology

Bluetooth technology, developed by Ericsson Mobile Communications, a. worldwide telecommunications company based in Sweden, is fast becoming the

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

IT 4504 Section 4.0. Network Architectures. 2008, University of Colombo School of Computing 1

CAN bus and NMEA2000 1

8. Networks. Why networked embedded systems General network architecture. Networks. Internet-enabled embedded systems Sensor networks

Operating Systems, Concurrency and Time. real-time communication and CAN. Johan Lukkien

Wireless (NFC, RFID, Bluetooth LE, ZigBee IP, RF) protocols for the Physical- Data Link layer communication technologies

Communication (III) Kai Huang

CAN Protocol Implementation

Computer and Network Security

Introduction to Computer Networks. 03 Data Link Layer Introduction

Special Course in Computer Science: Local Networks. Lecture

ENGINEERING Copyright , Philip Koopman, All Rights Reserved

Error characteristics and their prediction in ZigBee transmission at coexistence conditions

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

The Cubesat Internal bus: The I2C

04/11/2011. Wireless LANs. CSE 3213 Fall November Overview

CS 4453 Computer Networks Winter

A Framework Of Milk Dairy Automation Using CAN Protocol

Transcription:

EE414 Embedded Systems Ch 7. Network Interface Part 1/2 Byung Kook Kim School of Electrical Engineering Korea Advanced Institute of Science and Technology

Overview 7.1 Advanced Communication Principles [6.8] 7.2 Parallel Protocols [6.10] 7.3 Wireless Protocols [6.11] 7.4 Serial Protocols [6.9] 7.5 Controller Area Network 7.6 CAN Protocol 7.7 Ethernet 7.8 Ethernet Protocol 7.9 Socket Programming Embedded Systems, KAIST 2

7.1 Advanced Communication Principles Communication among processors Between computers On-board buses On-chip buses Layering Hierarchical organization of a communication protocol Lower levels provide services to higher level Lower level might work with bits while higher level might work with packets of data. Break complexity of communication protocol into pieces: easier to design and understand Embedded Systems, KAIST 3

Advanced Communication Principles (II) ISO OSI 7 Layer (International Standardization Organization Open System Interconnection) Host layers OSI Model Data unit Layer Function Data Segments 7. Application Network process to application 6. Presentation Data representation, encryption and decryption, convert machine dependent data to machine independent data 5. Session Interhost communication 4. Transport End-to-end connections and reliability, flow control Packet 3. Network Path determination and logical addressing Media layers Frame 2. Data Link Physical addressing Bit 1. Physical Media, signal and binary transmission Embedded Systems, KAIST 4

Advanced Communication Principles (III) Communications (in Physical Layer) A. Parallel communication Physical layer capable of transporting multiple bits of data B. Serial communication Physical layer transports one bit of data at a time C. Wireless communication No physical connection needed for transport at physical layer. Embedded Systems, KAIST 5

A. Parallel Communication Multiple data, control, and possibly power wires One bit data per wire Running in parallel Features Typically used when connecting devices on same IC or same circuit board Bus must be kept short Long parallel wires result in high capacitance values which requires more time to charge/discharge Data misalignment between wires increases as length increases Adv: High data throughput (with short distances) Disadv: Higher cost, bulky. Embedded Systems, KAIST 6

B. Serial Communication Single data wire, possibly also control and power wires Words transmitted one bit at a time Adv Higher data throughput with long distances Less average capacitance, so more bits per unit of time Cheaper, less bulky Disadv More complex interfacing logic and communication protocol Sender needs to decompose word into bits Receiver needs to recompose bits into word Control signals often sent on same wire as data increasing protocol complexity. Embedded Systems, KAIST 7

C. Wireless Communication Infrared (IR) Electronic wave frequencies just below visible light spectrum IR Diode emits infrared light to generate signal Infrared photo transistor detects signal, conducts when exposed to infrared light Adv: Cheap to build Disadv: Need line of sight, limited range Radio frequency (RF) Electromagnetic wave frequencies in radio spectrum Adv: Line of sight not needed, transmitter power determines range Disadv: Analog circuitry and antenna needed on both sides of transmission. Embedded Systems, KAIST 8

Error Detection and Correction Error detection: ability of receiver to detect errors during transmission Error correction: ability of receiver and transmitter to cooperate to correct problem Typically done by acknowledgement/retransmission protocol Bit error: single bit is inverted Burst of bit error: consecutive bits received incorrectly Parity: extra bit sent with word used for error detection Odd parity: data word plus parity bit contains odd number of 1 s Even parity: data word plus parity bit contains even number of 1 s Always detects single bit errors, but not all burst bit errors Checksum: extra word sent with data packet of multiple words e.g., extra word contains XOR sum of all data words in packet. Embedded Systems, KAIST 9

7.2 Parallel Protocols 7.2.1 PCI Bus PCI (Peripheral Component Interconnect) Bus High performance bus originated at Intel in the early 1990 s 132 MB/s initially. 32-bit transfer at 33 MHz clock Later extended to 64-bit while maintaining compatibility with 32-bit schemes Standard adopted by industry and administered by PCISIG (PCI Special Interest Group) Interconnects chips, expansion boards, processor memory subsystems Synchronous bus architecture Multiplexed data/address lines Embedded Systems, KAIST 10

7.2.2 ARM Bus ARM Bus Designed and used internally by ARM Corporation Interfaces with ARM line of processors 32-bit data, 32-bit addressing Synchronous data transfer architecture Data transfer rate is a function of clock speed If clock speed of bus is X, transfer rate = 16 x X bits/s 32 x X bits/s possible. Embedded Systems, KAIST 11

7.3 Wireless Protocols 7.3.1 IrDA IrDA (Infrared Data Association) Protocol suite that supports short-range point-to-point infrared data transmission Created and promoted by the Infrared Data Association (IrDA) Data transfer rate of 9.6 kbps and 4 Mbps IrDA hardware deployed in notebook computers, printers, PDAs, digital cameras, public phones, cell phones Lack of suitable drivers has slowed use by applications Windows 7/10 now include support Becoming available on popular embedded OS s Adv: Simplicity and low cost of IrDA hardware. Disadv: Line of sight. Embedded Systems, KAIST 12

7.3.2 Bluetooth Bluetooth New, global standard for wireless connectivity Ericcson 1994 Wireless alternative to RS-232C Standard: IEEE 802.15.1 Based on low-cost, short-range radio link ISM (Industrial, Scientific, and Medical) radio bands - 2.4 to 2.485 GHz Connection established when within 10 meters (or 100 meters) of each other No line-of-sight required e.g., Connect to printer in another room Embedded Systems, KAIST 13

Bluetooth (II) [Wikipedia] Implementation 79 Bluetooth channels with 1 MHz bandwidth Bluetooth low energy: 40 channels with 2 MHz bandwidth Data rage: 1, 2, or 3 Mbps Packet based protocol with a master-slave structure. Specifications Bluetooth 1.0/1.1/1.2 Inter-operable 2.0/2.1: Enhanced Data Rate up to 3 Mbps (2004) 3.0: High speed 24 Mbps (2009) 4.0/4.1/4.2: Bluetooth Low Energy protocol (2010) 5.0: IoT (2016/17) Applications Keyboard, Mouse, Earphone Embedded Systems, KAIST 14

7.3.3 Zigbee [Wikipedia] An IEEE 802.15.4-based specification for a suite of highlevel communication protocols used to create personal area networks with small, low-power digital radios. Simpler and less expensive than other wireless personal area networks (WPANs), such as Bluetooth or Wi-Fi. Transmission distances to 10 100 meters line-of-sight, Can transmit data over long distances by passing data through a mesh network of intermediate devices to reach more distant ones. Data rate of 250 kbit/s, best suited for intermittent data transmissions from a sensor or input device. Embedded Systems, KAIST 15

7.3.4 IEEE 802.11 WLAN IEEE 802.11 Proposed standard for wireless LANs Specifies parameters for PHY and MAC layers of network PHY layer physical layer handles transmission of data between nodes provisions for data transfer rates of 1 to 54 Mbps, or 108 Mbps operates in 2.4 to 2.4835 GHz frequency band (RF) or 300 to 428,000 GHz (IR) MAC layer (in Data Link Layer) medium access control layer protocol responsible for maintaining order in shared medium CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance). Embedded Systems, KAIST 16

7.4 Serial Protocols RS-485 Features A variation on RS-422 Used for low-cost networking up to 10 Mbps. Commonly used in many industrial applications One of the simplest and easiest network to implement. RS-485 network Multiple systems (nodes) to exchange data over a single twisted pair -> Embedded Systems, KAIST 17

RS-485 (II) Architecture Master/slave architecture All transactions are initiated by the master A slave will transmit only when specifically instructed to do so. No Standard protocols Many different protocols run over RS-485. Can create own protocol specific to the application at hand. RS-485 transceiver RS-422 transceiver with enable inputs Embedded Systems, KAIST 18

RS-485 (III) Operation All systems connected to the RS-485 network have their receivers enabled and listen to the traffic. Only when a system wishes to transmit does it enable its driver. A number of formal protocols use RS-485 as a transmission medium. Caution AVOID the possibility of two nodes on the network transmitting at the same time. Designate one node as a master node and the others as slaves. Only the master may initiate a transmission on the network. A slave may respond directly only to the master, once that master has finished. Number of nodes on the network 32 normal (512 with some chips). Embedded Systems, KAIST 19

7.5 CAN (Controller Area Network) CAN (Controller area network) Protocol for real-time applications developed by Robert Bosch GmbH in late 1980s Originally for communication among components of cars Complexity of automotive electronics A considerable amount of information exchange is required. Engine management systems, ABS braking, active suspension, electronic transmission, automated lighting, air-conditioning, security, and central locking Each is part of an integrated whole. Point-pt-point wiring inadequate: wiring/connector cost Unnecessary weight, reduced reliability, servicing a nightmare. Intersystem communication using a low-cost digital network. High noise immunity required: 400V transients. Embedded Systems, KAIST 20

Controller Area Network (II) Solution: Controller Area Network (CAN) A real-time communication up to 1 Mbps over a two-wire serial network up to 40 m. Specifies only the physical and data-link layers of the ISO-OSI model. International standard under ISO11898 and ISO11519-2. Robustness Expanded beyond automotive Industrial automation, trains, ship navigation and control systems Medical systems, photocopiers, agricultural machinery, household appliances, office automation, and elevators. Embedded Systems, KAIST 21

CAN (III) CAN distributed system Supports multiple masters on the network Each master responsible for local sensing and control within the distributed system CAN packet Contains address information and priority as part of the header The nodes may connect to and disconnect from the network, without affecting network traffic between other nodes. Embedded Systems, KAIST 22

CAN (IV) CAN network Wired-AND logic Maximum bus-length of 1000 meters (3300 feet) at 10 kbps 40 meters (133 feet) at 1 Mbps Termination Each end of the bus requires termination resistors (120 ohm) to prevent transmission reflections -> Embedded Systems, KAIST 23

CAN (V) CAN module Contained in Many Philips microcontrollers, Few PIC ucs, DSP56805 Microchip MCP25120 CAN module with SPI host interface CAN driver Philips PCA82C250T Physical attachment: Embedded Systems, KAIST 24

7.6 CAN Protocol Strategy: CSMA/CD+AMP (Carrier Sense Multiple Access/Collision Detection with Arbitration on Message Priority). Multimaster network. The content of the message is labeled by an identifier (11 or 29 bit) that is unique throughout the network. Non-destructive contention-based bus arbitration All nodes are allowed to start the transmission of a frame after the bus is idle. More than one node are starting transmission at the same time. Each node monitors the bus during transmission of the identifier field and the RTR bit. As soon as it detects a dominant bit while transmitting a recessive bit it releases the bus, immediately stops transmission and continues receiving the frame. Embedded Systems, KAIST 25

CAN Protocol (II) CAN protocol Embedded Systems, KAIST 26

CAN Protocol (III) The format of a standard CAN 2.0A message: 1. A Start of Frame (SOF) field. This is a dominant (logic 0) bit that indicates the beginning of a message frame. 2. An Arbitration field: An 11 bit message identifier The Remote Transmission Request (RTR) bit. 0: Data Frame. 1: Remote Transmission Request (otherwise known as Remote Frame). A Remote Frame is a request by one node for data from some other node on the bus. Remote Frames do not contain a Data Field. Embedded Systems, KAIST 27

CAN Protocol (IV) The format of a standard CAN 2.0A message (II) 3. A Control Field containing six bits: Two dominant bits (r0 and r1) that are reserved for future use, and A four bit Data Length Code (DLC) indicates the number of bytes in the Data Field that follows 4. A Data Field, containing from zero to eight bytes. 5. The CRC field, containing a 15 bit cyclic redundancy check code and a recessive delimiter bit 6. The ACKnowledge field, consisting of two bits. The first is the Slot bit which is transmitted as a recessive bit, but is subsequently over written by dominant bits transmitted from all other nodes that successfully receive the message. The second bit is a recessive delimiter bit. 7. The End of Frame field, consisting of seven recessive bits. 8. The INTermission field consisting of three recessive bits. After the three bit INTermission period the bus is recognized to be free. Bus Idle time may be of any arbitrary length including zero. Embedded Systems, KAIST 28

CAN Protocol (V) The CAN 2.0B format In Version 2.0B the Arbitration field contains two identifier bit fields. The first (the base ID) is eleven (11) bits long for compatibility with Version 2.0A. The second field (the ID extension) is eighteen (18) bits long, to give a total length of twenty nine (29) bits. The distinction between the two formats is made using an Identifier Extension (IDE) bit. A Substitute Remote Request (SRR) bit is included in the Arbitration Field. The SRR bit is always transmitted as a recessive bit: Ensure that, in the case of arbitration between a Standard Data Frame and an Extended Data Frame, the Standard Data Frame will always have priority if both messages have the same base (11 bit) identifier. Embedded Systems, KAIST 29

CAN Protocol (VI) Sophisticated error detection and error confinement mechanisms Very sophisticated error detection and error confinement mechanisms: resulting in a low residual probability of not detected errors. Monitoring of the transmitted bit level by the transmitting node. If the monitored bit level is different from the bit level that is sent, a bit error is detected. With this mechanism all globally effective bus errors are detected. Checking of fixed format elements and by checking of the CRC segment through a receiver. Providing a means for detecting of only locally effective errors with a very high probability. Embedded Systems, KAIST 30

CAN Protocol (VII) Error signaling instead of message confirmation provides system-wide data consistency and low error recovery times Only a corrupted message is signaled by means of an error frame. An error frame is transmitted as soon as an error condition is detected by a transmitting or receiving node: The transmitted message is destroyed and so network-wide data consistency provided. If a transmitting node sends or receives an error frame it automatically starts retransmission of the corrupted message: Provides a very short error recovery time which is much lower than that of competing protocols. Counter for counting of transmission and receiving errors and for performing a sophisticated error management. Embedded Systems, KAIST 31

References [1] Frank Vahid, Embedded system design: A unified hardware/software introduction, John Wiley & Sons, 2002. CAN: Search Internet. Embedded Systems, KAIST 32