English
Language : 

EZ-USB Datasheet, PDF (23/334 Pages) Cypress Semiconductor – The EZ-USB USB Integrated Circuit
into the host side, the PC. If USB had been defined as peer-to-peer, every USB device
would have required more intelligence, raising cost.
Here are two important consequences of the “host is master” concept:
1.5.1 Receiving Data from the Host
To send data to a USB peripheral, the host issues an OUT token followed by the data. If
the peripheral has space for the data, and accepts it without error, it returns an ACK to the
host. If it is busy, it instead sends a NAK. If it finds an error, it sends nothing back. For
the latter two cases, the host re-sends the data at a later time.
1.5.2 Sending Data to the Host
A USB device never spontaneously sends data to the host. Nevertheless, in the EZ-USB
chip, there’s nothing to stop the 8051 from loading data for the host into an endpoint
buffer (Section 1.13, "EZ-USB Endpoints") and arming it for transfer. But the data will sit
in the buffer until the host sends an IN token to that particular endpoint. If the host never
sends the IN token, the data sits there indefinitely.
1.6 USB Direction
Once you accept that the host is the bus master, it’s easy to remember USB direction: OUT
means from the host to the device, and IN means from the device to the host. EZ-USB
nomenclature uses this naming convention. For example, an endpoint that sends data to
the host is an IN endpoint. This can be confusing at first, because the 8051 sends data by
loading an IN endpoint buffer, but keeping in mind that an 8051 out is IN to the host, it
makes sense.
1.7 Frame
The USB host provides a time base to all USB devices by transmitting a SOF (Start Of
Frame) packet every millisecond. The SOF packet includes an incrementing, 11-bit frame
count. The 8051 can read this frame count from two EZ-USB registers. SOF-time has
significance for isochronous endpoints; it’s the time that the ping-ponging buffers switch
places. The EZ-USB core provides the 8051 with an SOF interrupt request for servicing
isochronous endpoint data.
Page 1-6
Chapter 1. Introducing EZ-USB
EZ-USB TRM v1.9