
63
VBUSIRQ, VBUSIE
NOVBUSIRQ, NOVBUSIE
Meaning:
VBUSIRQ:
V
BUS
Detect Interrupt Request
VBUSIE:
V
BUS
Detect Interrupt Enable
NOVBUSIRQ:
V
BUS
Absence Interrupt Request
NOVBUSIE:
V
BUS
Absence Interrupt Enable
Mode: Peripheral
and
Host
The SIE sets the VBUSIRQ and NOVBUSIRQ bits when the output of the internal V
BUS
comparator makes a 0-1 (VBUSIRQ) or 1-0 (NOVBUSIRQ) transition. This comparator
indicates the voltage on the VBCOMP (V
BUS
Comparator) pin. The CPU clears the VBUSIRQ
and NOVBUSIRQ bits by writing a 1 to them.
The CPU sets and clears the VBUSIE and NOVBUSIE bits which, when set, enable the
respective IRQ bits to activate the INT pin.
Programming Notes
These bits are active both in peripheral and host modes. In peripheral mode, they can be used in
self-powered designs to detect attaching and detaching from a USB host. They are not normally
required as V
BUS
detect bits in host mode, because the host supplies (and controls) V
BUS
power to
the USB connector. In this case the VBCOMP pin can be used as a general-purpose input, with
separate interrupts for each edge: 0-1 (VBUSIRQ) or 1-0 (NOVBUSIRQ). The VBCOMP pin
has a weak (~100k
Ω
) pulldown resistor to ground, so no termination resistor is required when
using the VBCOMP pin as a general-purpose input pin.
Some MAX3421E applications may implement both an A (host) and B (peripheral) USB
connector, and automatically configure the MAX3421E to reflect which connector has an
attached cable (the A-connector to a USB peripheral, or the B-connector to a USB host). In this
case the A-connector V
BUS
pin can be sourced by a local 5V supply, and the D+ and D-
MAX3421E pulldown resistors can be switched on to detect a peripheral device plugging into
the A connector. Host designs should use a current limiter/detector/switch such as the MAX4793
on the A connector V
BUS
pin. The V
BUS
pin on the B connector can connect to the MAX3421E
VBCOMP pin. This lets the circuit sense the presence of V
BUS
and thus detect when it is plugged
into a USB host. In this manner the system can self-configure to either peripheral or host.
Because most of the Interrupt Enable bits are cleared during a USB bus reset, the initialization
routine that turns on the interrupt enable bits should be called as part of servicing a USB bus
reset.