Power supply monitor circuit, Usb operation – Digilent 410-173-KIT User Manual
Page 4
Cerebot 32MX4 Reference Manual
www.digilentinc.com
page 4 of 15
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
the amount of current being used is close to its
limit.
Power Supply Monitor Circuit
The Cerebot 32MX4 microcontroller can
measure the power supply voltage on the VU
and VS power busses using the provided
power supply monitor circuits. This feature is
especially useful when using batteries because
it allows the microcontroller firmware to
determine the charge state of the battery and
potentially notify the user when a battery
supply is low.
Each power supply monitor circuit is made up
of a voltage divider that divides the power bus
voltage by four, and a filter capacitor to
stabilize the voltage. Jumper JP4 enables the
supply monitor circuit for VU power, and
jumper JP2 enables the supply monitor circuit
for VS power. The analog to digital converter
built into the PIC32 microcontroller is used to
measure the power supply voltages. ADC
channel 8 is used to measure VU and ADC
channel 9 is used to measure VS.
USB Operation
The PIC32MX460 microcontroller contains a
USB 2.0 Compliant, Full Speed Device and
On-The-Go (OTG) controller. This controller
provides the following features:
•
USB full speed host and device support
•
Low speed host support
•
USB OTG support
•
Endpoint buffering anywhere in system
RAM
•
Integrated DMA to access system RAM
and Flash memory.
When operating as a USB device, the Cerebot
32MX4 can be used as a self powered device
or as a bus powered device. To operate as a
self powered device, an external power supply
should be connected to any one of the three
external power connectors (J13, J14, or J18)
and a shorting block placed on the center,
“External Power” position of J12. To operate
as a bus powered device, the shorting block
should be placed in the “USB Device Port”
position on J12.
Connector J15, on the bottom of the board in
the lower right corner is the Device/OTG
connector. This is a standard USB micro-AB
connector. Connect a cable with a micro-A
plug (optionally available from Digilent) from
this connector to an available USB port for
device operation.
When operating as a USB host, the Cerebot
32MX4 must be externally powered. Connect
a regulated 5V power supply to any one of the
three external power connectors (J13, J14, or
J18) and ensure that the shorting block is in
the center, “External Power” position of J12.
The power supply used must be a regulated
5V supply. The Cerebot 32MX4 board provides
power to the attached USB device when
operating as a host, and the USB specification
requires the use of a 5V power supply.
Jumper JP6 is used to route power to the host
connector being used. Place the shorting
block in the “Host” position for use with the
standard USB Host Connector, J17. Place the
shorting block in the “OTG” position for use
with the USB OTG connector, J15.
When operating as a USB host, the
PIC32MX460 microcontroller controls
application of power to the connected device
via the VBUSON control pin. A shorting block
must be placed in the “VBUSON” position of
J16 to enable this connection. With the
shorting block in place, bus power is applied to
the device by driving the VBUSON pin high.
Power is removed from the device by driving
the VBUSON pin low. The VBUSON pin is
accessed via bit 3 of the U1OTGCON register.
The VBUSON pin drives the enable input of a
TPS2051B Current-Limited Power Distribution
Switch to control the USB device power. This
switch has over-current detection capability.
The over-current output pin can be monitored
via the INT2/RE9 pin on the PIC32MX460
microcontroller. Insert a shorting block on JP5
to enable this connection. Details about the