Presentation is loading. Please wait.

Presentation is loading. Please wait.

USB host for web camera connection

Similar presentations


Presentation on theme: "USB host for web camera connection"— Presentation transcript:

1 USB host for web camera connection
High Speed Digital Systems Lab USB host for web camera connection Midterm presentation Presenters: Alexander Shapiro Sergey Alexandrov 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 Output USB Philips ISP1362 controller.
Transfer rate: 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
Typical data transfer in Bulk mode. Nios to Host Nios to Host Host to Nios PTD 1 PTD 2 PTD 3

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 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. Host Register setup Control Transfer mode

21 Project Timeline Week Progress Challenges 1
Explored development environment 2 Examined USB Host protocol example of mouse specific functions. No isochronous transfer support. 3 Learned basic USB 1.1 Controller (Phillips ISP1362) Interface 4-5 Learned Webcam USB Protocol specification, Descriptors and Video class requests.

22 Adapted Mouse example to work with webcam.
Project Timeline Week Progress Challenges 6-9 Adapted Mouse example to work with webcam. No success with ISO traffic. Very slow progress due to inconsistent code in mouse example and lack of compatibility with webcam. 10-11 Software and hardware debug of USB protocol, to try and correct main issues. 12-13 All project rewrote from scratch using only relevant code and consistent with embedded programming guide.

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


Download ppt "USB host for web camera connection"

Similar presentations


Ads by Google