USB 2.0
4 tane pin kullanır. Açıklaması şöyle.
4 tane pin kullanır. Açıklaması şöyle.
USB 2.0 only requires 4 pins, but for the bandwidth of USB 3, you need the additional 5 pins.
Bu pinler şöyle
Power +, Power -, Data and ground
USB vs SCSI, IEEE-488, and enhanced parallel ports
Data için tek pin kullanmanın avantajı şöyle
At face value sending 8 bits at once seems faster than sending just one at a time. In reality, there are other factors that affect parallel transfers.The Achilles heel of parallel is the wait time between bytes. When the transmitter places a set of 8 bits on 8 lines it takes those bits a non zero amount of time to arrive at the receiver. Furthermore, those bits do not arrive at the same time. There is a spread between the fastest bit and the slowest bit. This spread requires that there is a blanking time between when the bits are asserted and when the bits are read.At slow speeds this blanking time is irrelevant. As the speeds increase this blanking time becomes significant. The blanking time has to account for the worst-case scenario. This includes the cable, connectors, circuit board traces, etc... As speeds increase the blanking time will become the limiting factor.With serial, all the bits come down the line back to back and require no blanking time. A speed increase only really requires the ability to cram the bits down the line faster. I'm glossing over that with serial signal integrity still needs to be maintained. Serial is also less sensitive to cabling abnormalities.
Negotiation
Negotiation aşamasında kullanılacak güç ve hız belirlenir. Açıklaması şöyle
The computer and the device starts with what you might call a "negotiation" where they agree on a number of things. One is the speed to use, they go from 1.5MBit per second and upwards to 10GBit/s. As each USB device has its own connection to the computer, via the hub, each can have different speed. The device also negotiates for power, as it can only draw 100mA from the start.
Negotiation aşamasında Identification Code gönderilir. Açıklaması şöyle
When you connect a USB device to your computer, the computer will first supply 5v over the port and data to request an init. The other end of the USB cable, the device, will have a controller chip that handles the communication of the port. It will send a response with an identification code.There is a huge list of generic identifications that it can use, or it can say other, and transmit an additional code. In case of a computer, if this happens, it will look if drivers are installed or available matching this unique identifier. If not, it will respond with: "The device was not recognized." and you can only get it to work by installing the right driver, which will add support for that unique identification code.Once the initial stage is complete, the device goes into operation mode, and the driver will continue to communicate to the USB device.
Eğer özel bir sürücü gerekiyorsa Vendor ID gönderilir. Açıklaması şöyle
The USB device will in the protocol present itself with a Vendor Id, that is a unique number assigned for a vendor and also more information on the device. This information allows a vendor specific device driver in the computer to talk with the device.
USB Communication Device (CDC)
Seri iletişim içindir. Açıklaması şöyleThe CDC drivers present a serial port to user-land programs on your computer, which can read and write a stream of data while the underlying device class host driver handles framing it and doing all the other lower-level USB stuff. Because the specification is standardized, you benefit from knowing that your application on top of USB CDC should work regardless of what vendor your CDC-compatible device is from (as long as they follow the spec), because your system's drivers are likely implemented to the spec1Meanwhile, your application can use the serial port without needing to worry about what physical hardware underpins it. It could be serial over USB, it could be a nine-pin D-sub connector serial port implemented with a UART on your motherboard's IO controller, or it could perhaps be a serial link on top of TCP/IP.
Host ile USB arasındaki iletişim şu benzer
Host: Do you have a message?Profile/Class
Device: No.
Host: I have a message for you
Device: OK
Host: hi\n
Device: OK
Host: Do you have a message?
Device: No.
Host: Do you have a message?
Device: hel
Host: Do you have a message?
Device: llo\n
Host: Do you have a message?
Device: No.
etc. etc.
Hiç yorum yok:
Yorum Gönder