1 / 24

USB host for web camera connection

High Speed Digital Systems Lab. USB host for web camera connection. Presenters: Alexander Shapiro Sergey Alexandrov. Midterm presentation. Supervisor: Mike Sumszyk. Agenda. Project Objectives. System Architecture. USB Basics and general protocol. ISP1362 specific protocol.

stevie
Download Presentation

USB host for web camera connection

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. High Speed Digital Systems Lab USB host for web camera connection Presenters: Alexander Shapiro Sergey Alexandrov Midterm presentation Supervisor: Mike Sumszyk

  2. Agenda • Project Objectives. • System Architecture. • USB Basics and general protocol. • ISP1362 specific protocol. • Implementation. • Timeline.

  3. Project Objectives • Implementation of SOPC interface for USB webcam. • Learn USB host protocol. • Learn webcam protocol. • Learn SOPC Development tools. • Understand NIOS II architecture. • Building NIOS II softcore system. • Stream real-time video to VGA.

  4. Development Environment • Altera DE2 board • Provides USB support for host and device application. • VGA output (up to1600 x 1200 at 100-Hz refresh rate). • Cyclone II FPGA • Programmable chip to implement any design. • Programming tools: • Quartus II • Nios II IDE • SOPC Builder

  5. System Architecture Input • USB Philips ISP1362 controller. • Transferrate: 12 Mb/s. • Optional: DE3 board with USB 2.0. • up to 480 Mb/s. Output • VGA DAC (10-bit triple DACs). • Up to 1600x1200 at 100-Hz.

  6. USB Basics Host and Client • Host is master controller that initiates USB connection and traffic. Host is responsible to serve and control all the clients. • Client is device that connects to the host. Clients are divided to defined classes, like video/audio class, HID, etc. Each class has generic and specific properties.

  7. USB Basics Terminology • Speed - usb bus speed, full speed (USB1.1), high speed (USB2) or low speed. • Port is physical interface between host and client. DE-2 has 2 USB-ports. • Descriptor is data structure that resides in client`s memory and describes different aspects of the device (speed, resolution, supported protocols etc.)

  8. USB Basics Generic Descriptors • Device Descriptor -contains basic device description. (speed, brand, vendor) • Configuration Descriptor – specifies device`s features and abilities. Consists of Interface Descriptors that describe each separate feature. (device class, supported data transfers and formats, resolution and bit rate)

  9. USB Basics Video Class Interface Descriptor: • Describes Video interface. • Endpoint Descriptors. • Defines ISO packet size and direction. • Video Format Descriptors. • Defines streaming video format. • Video Frame Descriptors. • Defines resolution and frame interval.

  10. USB generic protocol When device is connected • Host initializes connection and determines kind of the device. • Host requests configuration descriptor. • Probe and commit sequence. • Host selects data interface. • Device is configured and ready to work.

  11. USB generic protocol When device is connected • Host initializes connection and determines kind of the device. • Host switches USB-port to operational mode. • Host enumerates connected device. • Host requests Device Descriptor. This stage is needed to determine device speed and maximum packet size.

  12. USB generic protocol When device is connected • Host requests configuration descriptor. • In this stage Host learns what kind of device is connected and what is abilities. • What services it provides, and at what rates. • Number of configurations (Interface descriptors) • Other basic information

  13. USB generic protocol When device is connected • Probe and commit sequence. • Negotiation between Host and Video streaming interface. • Consists of Host`s requests with supported streaming parameters (bit rate, resolution) and Client`s confirmation/denial • When acceptable combination is obtained Host sends commit request on these parameters.

  14. USB generic protocol When device is connected • Host selects data interface. • Host selects data interface that corresponds to committed parameters. • After this stage device is configured and ready to work.

  15. ISP1362 general description Support Bulk, Control, Interrupt and ISO transfers. Each transfer type has separate buffer. ATL, INT and ISTL0/1 and buffers. Supports two USB ports. All interaction with Host is implemented with read/write control registers that are mapped to NIOS memory for direct access.

  16. ISP1362 general description • Support Bulk, Control, Interrupt and ISO transfers. • Control - Used to get device description and configuration. • Bulk - Used for transferring big data chunks. • Interrupt - Used for polling small data requests. • Isochronous - Used for Audio/Video streams.

  17. ISP1362 general description Philips Transfer Descriptor (PTD) • Provides a communication channel between Host controller and NIOS. • Structure: • Header: • Packet size. • Type of request. • Direction of transfer. • Payload: • Data/Command. (only if required)

  18. ISP1362 general description Nios to Host Nios to Host Host to Nios PTD 1 PTD 2 PTD 3 Typical data transfer in Bulk mode.

  19. ISP1362 specific protocol Host and device initialization: Buffer’s sizes must be set for all kinds of traffic (ATL, ISTL0/1 and INT buffers). Ports must be powered up and enabled. Operational state must be entered in order to allow USB traffic. Prior to this host is in suspended state.

  20. ISP1362 specific protocol Host Register setup Control Transfer mode Host and device initialization: • Init ATL, ISTL0/1 and INT buffers. • Init USB port1 and port2. • Enter operational mode. • Detect device connection. • Enable connected port1. • Enumerate • Get device description. • Configure device.

  21. Project Timeline

  22. Project Timeline

  23. References Philips Embedded Programming guide Philips ISP 1362 Data Sheet USB 2.0 Specification USB Video Class Specification USB Complete by Jan Axelson Google

  24. Fin

More Related