beautypg.com

9 uart interface – Digilent 410-295P-KIT User Manual

Page 16

background image

ChipKIT Pro MX4 Reference Manual

Copyright Digilent, Inc. All rights reserved.

Other product and company names mentioned may be trademarks of their respective owners.

Page 16 of 37

Jumper JP6 is used to route power to the host connector being used. Place the shorting block in the “HOST”

position when using the standard USB type A (host) connector, J17. Place the shorting block in the “OTG” position

for use with the USB micro-AB (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. 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.

Pin 20 of the PIC32MX460 microcontroller is used for the VBUSON function. Place the shorting block in the

VBUSON position of jumper block J16 when using the ChipKIT Pro MX4 for USB host operation.

The VBUSON pin drives the enable input of a TPS2051B Current-Limited Power Distribution Switch to control the

application of USB power to the host connector. This switch has over-current detection capability and provides an

over-current fault indication by pulling the signal P32_USBOC low. Jumper JP5 is used to enable monitoring of the

overcurrent fault indication. The over-current output pin can be monitored via the INT2/RE9 pin on the

PIC32MX460 microcontroller when a shorting block is installed on JP5. The INT2/RE9 pin is also connected to Pmod

connector JE, pin 7 (JE-07). Pmod connector pin JE-07 should not be used when using INT2/RE9 to monitor the

USB overcurrent fault indicator. Remove the shorting block from JP5 to restore normal operation of JE-07.

Details about the operation of the TPS2051B can be obtained from the data sheet available at the Texas

Instruments web site.

Jumper JP10 can be used to disconnect the power supply from USB load switch, IC6, when the board is operating

from a power supply with a higher voltage than 5V. When the ChipKIT Pro MX4 is operating as a USB host, a

shorting block must be in place on JP10.

The Microchip Applications Library, MAL, available on the Microchip web site contains USB driver code for

implementing either USB host devices or USB function devices. This library contains numerous examples

demonstrating both device and host operation of PIC32 microcontrollers. With minor modification or

configuration, these reference designs are suitable to use for developing USB firmware for the ChipKIT Pro MX4

board.

Digilent has USB libraries available that can be used to develop both USB device and USB host applications when

using the board with the MPIDE development environment. These libraries can be downloaded from the ChipKIT

Pro MX4 product page on the Digilent web site.

The Digilent chipKIT libraries contain examples illustrating various USB host and device applications.

9 UART Interface

The PIC32MX460 microcontroller provides two UART interfaces, UART1 and UART2. These UARTs can provide

either a 2-wire or a 4-wire asynchronous serial interface. The 2-wire interface provides receive (RX) and transmit

(TX) signals. The 4-wire interface includes request-to-send (RTS) and clear-to-send (CTS) in addition to receive and

transmit.

UART1 can be accessed from Pmod connector JE and UART2 can be accessed from Pmod connector JH using the

following pins: