PIC18F-LF1XK50 MICROCHIP [Microchip Technology], PIC18F-LF1XK50 Datasheet - Page 276

no-image

PIC18F-LF1XK50

Manufacturer Part Number
PIC18F-LF1XK50
Description
20-Pin USB Flash Microcontrollers
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
PIC18F/LF1XK50
The USB specification limits the power taken from the
bus. Each device is ensured 100 mA at approximately
5V (one unit load). Additional power may be requested,
up to a maximum of 500 mA. Note that power above
one unit load is a request and the host or hub is not
obligated to provide the extra current. Thus, a device
capable of consuming more than one unit load must be
able to maintain a low-power configuration of a one unit
load or less, if necessary.
The USB specification also defines a Suspend mode.
In this situation, current must be limited to 500 A,
averaged over 1 second. A device must enter a
Suspend state after 3 ms of inactivity (i.e., no SOF
tokens for 3 ms). A device entering Suspend mode
must drop current consumption within 10 ms after
Suspend. Likewise, when signaling a wake-up, the
device must signal a wake-up within 10 ms of drawing
current above the Suspend limit.
22.10.5
When the device is initially attached to the bus, the host
enters an enumeration process in an attempt to identify
the device. Essentially, the host interrogates the device,
gathering information such as power consumption, data
rates and sizes, protocol and other descriptive
information; descriptors contain this information. A
typical enumeration process would be as follows:
1.
2.
3.
4.
5.
6.
7.
8.
The exact enumeration process depends on the host.
22.10.6
There are eight different standard descriptor types of
which five are most important for this device.
22.10.6.1
The device descriptor provides general information,
such as manufacturer, product number, serial number,
the class of the device and the number of configurations.
There is only one device descriptor.
DS41350E-page 276
USB Reset: Reset the device. Thus, the device
is not configured and does not have an address
(address 0).
Get Device Descriptor: The host requests a
small portion of the device descriptor.
USB Reset: Reset the device again.
Set Address: The host assigns an address to the
device.
Get Device Descriptor: The host retrieves the
device descriptor, gathering info such as
manufacturer, type of device, maximum control
packet size.
Get configuration descriptors.
Get any other descriptors.
Set a configuration.
ENUMERATION
DESCRIPTORS
Device Descriptor
Preliminary
22.10.6.2
The configuration descriptor provides information on
the power requirements of the device and how many
different interfaces are supported when in this configu-
ration. There may be more than one configuration for a
device (i.e., low-power and high-power configurations).
22.10.6.3
The interface descriptor details the number of end-
points used in this interface, as well as the class of the
interface. There may be more than one interface for a
configuration.
22.10.6.4
The endpoint descriptor identifies the transfer type
(Section 22.10.3
as some other specifics for the endpoint. There may be
many endpoints in a device and endpoints may be
shared in different configurations.
22.10.6.5
Many of the previous descriptors reference one or
more string descriptors. String descriptors provide
human
(Section 22.10.1
describe. Often these strings show up in the host to
help the user identify the device. String descriptors are
generally optional to save memory and are encoded in
a unicode format.
22.10.7
Each USB device must indicate its bus presence and
speed to the host. This is accomplished through a
1.5 k resistor which is connected to the bus at the
time of the attachment event.
Depending on the speed of the device, the resistor
either pulls up the D+ or D- line to 3.3V. For a
low-speed device, the pull-up resistor is connected to
the D- line. For a full-speed device, the pull-up resistor
is connected to the D+ line.
22.10.8
USB specifications include class specifications which
operating
Examples of classes include Audio, Mass Storage,
Communications and Human Interface (HID). In most
cases, a driver is required at the host side to ‘talk’ to the
USB device. In custom applications, a driver may need
to be developed. Fortunately, drivers are available for
most common host systems for the most common
classes of devices. Thus, these drivers can be reused.
readable
BUS SPEED
CLASS SPECIFICATIONS AND
DRIVERS
system
Configuration Descriptor
Interface Descriptor
Endpoint Descriptor
String Descriptor
“Transfers”) and direction, as well
“Layered
information
vendors
 2010 Microchip Technology Inc.
Framework”)
optionally
about
the
support.
layer
they

Related parts for PIC18F-LF1XK50