USB for Embedded Devices Mohit Maheshwari 200601008 Prashant Garg - - PowerPoint PPT Presentation

usb for embedded devices
SMART_READER_LITE
LIVE PREVIEW

USB for Embedded Devices Mohit Maheshwari 200601008 Prashant Garg - - PowerPoint PPT Presentation

USB for Embedded Devices Mohit Maheshwari 200601008 Prashant Garg 200601144 USB : An Introduction The Universal Serial Bus (USB) is a specification developed by Compaq, Intel, Microsoft and NEC, joined later by Hewlett-Packard, Lucent


slide-1
SLIDE 1

USB for Embedded Devices

Mohit Maheshwari 200601008 Prashant Garg 200601144

slide-2
SLIDE 2

USB : An Introduction

 The Universal Serial Bus (USB) is a

specification developed by Compaq, Intel, Microsoft and NEC, joined later by Hewlett-Packard, Lucent and Philips.

 These companies formed the USB

Implementers Forum, Inc.

slide-3
SLIDE 3

The need for USB

 Laborious and error-prone

configuration of the RS-232 port.

 Incompatible RS-232 connectors.  High Power requirements of the

transceivers.

 Point-to-Point nature of the

connections , thus sharing among multiple devices meant a lot of cable and connector requirements.

slide-4
SLIDE 4

The Evolution of USB

 USB 1.0: January 1996. Specified data rates of

1.5 Mbit/s and 12 Mbit/s. Had many limitations , wasn’t widely adopted

 USB 1.1: September 1998. Fixed bugs of earlier

version, was widely accepted.

 USB 2.0: April 2000. Added Speed of 480 Mbit/s  USB On-the-Go: December 2006. Host not

needed any more.

 Micro USB: April 2007.Specially for Mobile Phones  USB 3.0: (5 Gbit/s) In pipeline. Expected to be

commercially available in 2010.

slide-5
SLIDE 5

Architecture

Tiered Star Topology. Can connect to a maximum 127 devices. Maximum number of tiers permitted is 6. Length of cable limited to 5m.

slide-6
SLIDE 6

The Concept of HOST!!

 HOST is master  Devices can’t communicate directly

Device 1 Device 2 Host

slide-7
SLIDE 7

USB Host Types

 Intel developed the UHCI (Universal Host

Controller Inter-face) specification. More Software Oriented Version.

 A team led by Compaq, Microsoft, and

National Semiconductor came out with the OHCI (Open Host Controller Interface)

  • specification. More Hardware Oriented

Version.

With the introduction of the high-speed

data rate of USB Version 2.0, all of the participants agreed to the EHCI (Enhanced Host Controller Interface) specification.

slide-8
SLIDE 8

USB On the Go

Device 1 Device 2

Devices can become limited role hosts Marked the emergence of usage of USB in portable platforms Removed the often-cited limitation that USB requires a desktop computer or equivalent to act as a host.

slide-9
SLIDE 9

Cables and Connectors

 Type- A  Type-B  mini-B-Type  mini-A-Type  micro-AB-Type

slide-10
SLIDE 10

Cable Types

1.

A high/full speed detachable cable with

  • ne end terminated with an A plug and

the other end with a B or mini-B plug.

2.

A captive high/full speed cable where

  • ne end is hardwired to the vendors

equipment and the other end is terminated with an A plug.

slide-11
SLIDE 11

Device Powering

 A device (or hub) can only sink (consume)

current from its upstream port and source to downstream port.

 A device which draws its power from the bus is

called a 'bus-powered' device. It relies solely on the USB cable.

 A 'self-powered' device is one which does not

draw power from the bus. An additional power cable is attached.

 Note : USB Connectors are specially designed

with power pins longer than signal pins so that power is always applied before signals.

slide-12
SLIDE 12

Anatomy of a Packet

Packet, the fundamental element of communication on USB Bus

slide-13
SLIDE 13

The Fundamental Packet

 SYNC sequence used by receiver to

tune its clock with the transition of the received data. It is of 8 bits.

 Packet information varies from 1 to

1025 bytes. First byte, Packet Identifier (PID) defines how other information bytes should be

  • interpreted. Presently there are 10

defined PID types

 The last part of a packet is the End-of-

packet identifier.

slide-14
SLIDE 14

Data Transfer

 Once powered up, host queries all the

devices connected to the bus and assigns each one an address. This process is called Enumeration.

 Host also enquires what type of data

transfer is the device wishing to perform:

  • Interrupt (For mouse or keyboard)
  • Bulk (For printer)
  • Isochronous (Streaming devices like

Speaker)

slide-15
SLIDE 15

USB on Embedded Systems

Any embedded device with a processor has a potential to act as a USB host. Potential Embedded platforms:

 Cell Phones  PDAs  Digital Cameras  Set top Boxes and more …….

slide-16
SLIDE 16

Challenges of implementing USB

  • n an embedded platform

USB on a PC USB on an embedded device MB and GB of memory available Only KB of memory available  2 GHz micro-processor 12-33 MHz Processor  Hard drive space in GB , greater than 100 GB now a days  No hard drive at all  Last but not the least, many skilled engineers are well versed in designing PC based USB applications  USB on embedded systems is relatively new and not many people have an idea about it. 

slide-17
SLIDE 17

But there is a silver lining!!

New updates to incorporate USB on embedded platforms include:

Modern embedded devices allow

alternative connection strategies.

Lowered host power requirements. 480-Mbps data rate.

slide-18
SLIDE 18

USB 1.1 vs Serial vs Parallel

slide-19
SLIDE 19

USB interfacing with Microcontroller

 Few years back, migrating to USB was difficult pertaining to higher costs.  New MCUs with native USB interfaces offer a better solution

slide-20
SLIDE 20

USB interfaced with Microcontroller

Latest architectures include direct integration

  • f

the USB interface and transceiver with the MCU core. This allows the application to take full advantage of the bus potential.

Due to large amounts of flash program memory on chip, MCUs with native USB interfaces can manage the entire application in a single-chip USB.

This results in an effective component count reduction and

  • verall

real system cost savings.

slide-21
SLIDE 21
slide-22
SLIDE 22
slide-23
SLIDE 23

Linux Based USB Devices

Write custom Linux kernel module. Provides the power to do sophisticated things like emulating a file system etc.

Use USB bus as a high speed serial port. Implemented in the Linux kernel for Strong ARM processors. Straightforward approach and mostly used.

Ethernet over USB. Linux has modules to implement both the host and device sides of this capability. The Linux kernel for the iPAQ uses this, since the iPAQ hardware has neither an accessible serial port nor a dedicated network interface. Note: Correct approach depends on how much time one wants to spend in development and how we want our embedded application to use the USB interface.

slide-24
SLIDE 24

Why Linux for using USB?

 Linux not only contains drivers for

host controllers, but for device controllers as well.

 These controller drivers enable Linux-

based embedded systems to use USB to communicate with a host computer (which may or may not be running Linux as well).

 USB communications under Linux are

flexible and easy to use.

slide-25
SLIDE 25

USB: The Road Ahead

 Micro USB has recently arrived in

  • market. Same port for charging and

wired connectivity. Caters to the demands of the reducing size of devices.

 USB 3.0

slide-26
SLIDE 26

References

 Jan Axelson, USB Complete Everything You Need to

Develop Custom USB Peripherals, 3rd edition

 John Hyde, USB Design by Example A Practical

Guide to Building IO Devices, 2nd Edition

 Datasheets – ATMega32, ATMega32U4, FT232  http://www.embedded.com  http://www.usbmadesimple.co.uk/  http://www.everythingusb.com/  http://www.embedded-computing.com/  http://www.lvr.com/usb.htm

slide-27
SLIDE 27

Thank You !!