USB โดย นาย กิตติพงศ์ เอกไชย 43650035 นางสาว เบญจา บุญเอื้อ 43650167 นาย กิตติพงศ์ เอกไชย 43650035 นางสาว เบญจา บุญเอื้อ 43650167 นางสาว สุดารัตน์ วาจาพัฒนา 43650332 วิชา 204521 Digital System Architecture
ประวัติของ USB (Universal Serial Bus) (1) Universal Serial Bus ถูกผลิตขึ้นเมื่อปี 1995 โดยบริษัทชั้นนำเช่น Compaq, Hewlett Packard, Intel, Lucent, Microsoft, NEC และ Philip จุดประสงค์เพื่อทำการพัฒนาช่องทางการส่งข้อมูลให้กับคอมพิวเตอร์ไปยัง PC ให้ง่ายเหมือนกับการที่ เราสามารถใช้โทรศัพท์ได้โดยเพียงการใช้ปลั๊กสายโทรศัพท์ต่อเข้ากับเต้าเสียบที่ติดกับฝาผนัง ใช้งานง่าย และมีราคาถูก ความเร็วสูงกว่า 100 เท่าเมื่อเทียบกับ serial port สนับสนุนการเชื่อมต่ออุปกรณ์หลายๆ ตัว เช่น printer scanner
System Resources Used by Legacy Pheripheral Devices
ข้อดีและประโยชน์ของการใช้ USB ง่ายต่อการติดตั้ง ไม่ต้องคำนึงถึงการ conflict ของ resource สามารถตรวจสอบอุปกรณ์อย่างอัตโนมัติ Plug and play support hot attachment
Table 2-1 Application,Relative Performance Required and Desired Attributes
Various Solutions with Relative Performance and Complexity
USB System Implement in a PCI-based Platform
The primary hardware and software in USB USB Hardware USB Host Controller/Root Hub USB Hubs USB Devices -USB Software USB Device Drivers USB Driver Host Controller Driver
Communication Flow in a USB System
USB Host Controller Driver USB Device Drivers - issue request to USB driver via IO Request Packets ( IRPs ) - supplying a memory buffer USB Driver - know the charateristics of USB and how to communicate - organize the request into individual transaction USB Host Controller Driver - schedule transactions to be broadcast over USB build a series of transaction list (one list or frame execute at 1ms) Each 1 ms frame begin with a start of frame (SOF)
USB Host Controller/Root Hub The Host Controller Generate the transactions which includes this information USB Device Address Type of Transfer Direction of Transfer Address of Device Driver’s Memory Buffer Read Write Read data from a memory buffer -> delivered to the target device Parallel to serial conversion on data -> creates USB transaction -> Forward to root hub to send over the bus
Read Build read transaction -> send to root hub -> hub transmit over USB -> target recognize -> send back data to root hub -> Root hub forward data to host controller -> host controller Convert serial to parallel and transfer data to the device driver’s Memory buffer.
The root hub Provide the connection points for USB devices and this operations Control power to its USB ports Enables and disable ports recognizes devices attached to each ports sets and report status events Root hub consists of A hub controller repeater
Block Diagram of Major Root hub Functions
USB Hub Types
Primary hub Functions
Hub Repeater
Communication Flow USB Client USB Driver Host Controller Driver Hub Device
USB Driver Provides interface and services for client software drivers, allocate bus bandwidth, and manages configuration process
Host Controller Driver Controls operation of the host controller, schedules transactions and monitors completion status of transactions
Communication Flow
Transfers Transfer type Isochronous Transfers Bulk Transfers Interrupt Transfers Control Transfer
Frames USB communication is based on transferring data at regular (1ms) intervals call “Frames” Each USB device requires a portion of the USB bandwidth be allocated during these 1ms frames
Frame Example
Device Framework USB Bus Interface Layer represent the actual transfer of data across the USB cable between the host system and USB device USB Device Layer represent the portion of USB that comprehends the actual USB communication mechanism and the nature of transfers required by USB functional device. Function Layer represents the relationship between client software and a given device’s functional interface
Device Framework
ประวัติของ USB (Universal Serial Bus) (2)
การเชื่อมต่อของ USB รุ่น 1.1 บทบาทของ system software ทำหน้าที่กำหนดมุมมองของ IO system ให้กับ แอปพลิเคชั่นต่างๆ โดยทำการปกปิดรายละเอียดเกี่ยวกับการติดต่อกับฮาร์ดแวร์ การ ติดต่อกับ USB แล้วจะเป็นไปในรูปแบบของการค้นพบอุปกรณ์ USB ที่ต่อด้วยแบบอัตโนมัติ เพื่อทำการ load เอา device driver ที่เหมาะสมมาใช้
การเชื่อมต่อของ USB รุ่น 1.1 บทบาทของ hub ทำให้เกิดการเชื่อมต่อของ อุปกรณ์ USB hub ยังทำหน้าที่ในการจ่าย กระแสไฟให้กับอุปกรณ์ที่ต่ออยู่กับมันอีกดโดยจะจ่ายกระแสไฟให้อย่างน้อย 0.5 W ต่ออุปกรณ์ USB 1ตัว ภายใต้การควบคุมของHost PC software , hub สามารถทำการจ่ายกระแสได้ มากถึง 2.5 W การทำงาน hub ซึ่งทำหน้าที่เป็น Bi-Directional Repeater จะทำการส่ง USB signal ไปยังทิศทางที่ต้องการ เช่น จาก host ไปอุปกรณ์ และ จากอุปกรณ์ ไป host hub สามารถ ใช้ได้กับ การส่ง แบบ full speed ซึ่งเท่ากับ 12 Mbs และ lowspeed เท่ากับ 1.5 Mbs
การเชื่อมต่อของ USB รุ่น 1.1 ทำหน้าที่ในการรับใช้ host PC โดยทำการส่ง ข้อมูลและ รับข้อมูลจาก host PC เมื่อมีการร้องขอ โดยการส่งข้อมูล จะทำให้อยู่ในรูปแบบ USB Data , อุปกรณ์ USB 1.1 ทำงานในการรับส่งข้อมูลที่ อัตรา 12 Mb/s หรือ ที่ 1.5 Mb/s
การเชื่อมต่อใน USB 2.0 บทบาทของ system software บทบาทยังคงเหมือนกับที่มีใน USB 1.1 แต่หาก system software ค้นพบว่าอุปกรณ์ดังกล่างเป็นอุปกรณ์แบบ USB 2.0 มันก็ควรจะให้ประสิทธิภาพที่เกิดขึ้นกับอุปกรณ์ดังกล่าว เป็นแบบ USB 2.0 ซึ่งก็คือสามารถถ่ายโอนข้อมูลได้เร็วขึ้น
การเชื่อมต่อใน USB 2.0 บทบาทของ USB 2.0 hub สามารถรับ high speed ที่ส่งถึงมันและทำการส่งต่อให้กับ อุปกรณ์ USB 2.0 และ อุปการณ์ USB 1.0 โดยอัตราการส่ง นี้ทำให้อุปกรณ์ hub มีความซับซ้อนมากขึ้น และ ต้องมี buffer เพื่อใช้เป็นที่เก็บ ชั่วคราวให้กับ ข้อมูลที่ส่งเข้ามาแบบ high speed ตัวอย่างง่ายๆ ของการเชื่อมต่อ กับ อุปกรณ์ USB 2.0 , hub แบบ USB 2.0 เพียงทำการทบทวนสัญญาณ high speed สำหรับอุปกรณ์ USB 2.0 แต่ในการเชื่อมต่อกับ อุปกรณ์ USB 1.1 , hub USB 2.0 มีกลไกสนับสนุน เรื่องของการจัดให้ อัตราการส่ง ไปยังอุปกรณ์มีค่าเหมาะสมกับประเภทของอุปกรณ์นั้น นั้นหมายความว่า hub จัดการกับแปลงข้อมูลที่รับมาจาก host ในอัตรา high speed ให้เหลือเป็น low speedแล้วทำการส่งต่อให้อุปกรณ์สำหรับอุปกรณ์ ที่เป็น USB 1.1
การเชื่อมต่อใน USB 2.0 บทบาทของอุปกรณ์ แบบ USB อุปกรณ์ในปัจจุบันบางชนิดไม่จำเป็นต้องเปลี่ยนไปให้เป็นแบบ USB 2.0 เช่น อุปกรณ์ที่เกี่ยวข้องกับการติดต่อกับ มนุษย์ อย่างเช่น เมาส์ , คีย์บอร์ด , จอยสติก ซึ่งไม่มีความจำเป็นต้องใช้เป็น แบบ USB 2.0 เป็นแค่ USB 1.1 ก็เพียงพอแล้ว แต่ในอุปกรณ์บางชนิด เช่น วีดิโอ คอนเฟอเร็นซ์ ต้องการ ความเร็วในการรับส่งสูงเป็นต้น
ตารางเปรียบเทียบ USB กับ เทคโนโลยีอื่น
The End.