Datasheet

MAX3421E
USB Peripheral/Host Controller
with SPI Interface
25
Maxim Integrated
MAX3421E in a Self-Powered Application
Figure 20 shows a self-powered peripheral design in
which the µP has its own power source. This is a com-
mon configuration in battery-powered handheld
devices. Figure 20 also illustrates the SPI interfacing
with the minimum number of pins. This is achieved by
using a single bidirectional data line and no interrupt
pin connection. The MAX3421E register bit, FDUPSPI,
configures the SPI interface for bidirectional operation.
Although Figure 20 shows V
L
= V
CC
, if the microcon-
troller uses a different interface voltage (1.71V to 3.6V),
this reference voltage can be connected to V
L
. The
Figure 20 circuit shows a connection from the MAX3421E
GPX output to the microcontroller. GPX can be pro-
grammed (see Table 5) to connect the output of the inter-
nal V
BUS
comparator to the GPX output. This enables the
microprocessor to detect a USB plug-in event even if the
MAX3421E is put into its power-down state.
The V
BUS
detect input, VBCOMP, is an important
MAX3421E feature. Because the µP is powered
whether the USB device is plugged in or not, it needs
some way to detect a plug-in event. A comparator
inside the MAX3421E checks for a valid V
BUS
connec-
tion on VBCOMP and provides a connect status bit to
the µP. Once connected, the µP can delay the logical
connection to the USB bus to perform any required ini-
tialization, and then connect by setting the CONNECT
bit to 1 in the MAX3421E register USBCTL (R15). This
connects the internal 1.5kΩ resistor from D+ to 3.3V, to
signal the host that a device has been plugged in.
If a host turns off V
BUS
while the device is connected,
the USB rev. 2.0 specification requires that the device
must not power its 1.5kΩ pullup resistor connected to
D+. The MAX3421E has two features to help service
this event. First, the NOVBUSIRQ bit indicates the loss
of V
BUS
. Second, the µP can set a bit called VBGATE
(V
BUS
gate) to instruct the MAX3421E to disconnect the
pullup resistor anytime V
BUS
goes away, regardless of
the CONNECT bit setting.
MAX3421E in a Host Application
Figure 21 illustrates the MAX3421E operating as an
embedded host. A host supplies V
BUS
power to a
peripheral; therefore, this circuit requires an external 5V
supply. A circuit that provides power to external
devices should include power protection (the
MAX4793, for example, which limits current from
300mA to 400mA) to ensure that the circuit can contin-
ue to operate if the plugged-in device causes an over-
current condition. The FLAG indicator of the overcurrent
switch connects to one of the eight MAX3421E GPIN
MAX3421E
V
CC
V
L
XI XO
INT
MOSI
MISO
SCLK
RES
D+
D-
D+
D-
VBCOMP
SS
0.1μF
GND
V
BUS
33Ω
33Ω
1.0μF
CERAMIC
1.0μF
CERAMIC
C
XI
C
XO
12MHz
μP
88
USB "B"
CONNECTOR
GND GPIN GPOUT
GPIO
GPX
N.C.
N.C.
+3.3V
Figure 20. MAX3421E in a Self-Powered Peripheral Application