P A G E 30
E a s y P I C v 8 f o r P I C 2 4 / d s P I C 3 3
M a n u a l
1
2
3
4
P A G E 30
COMMUNICA
TION
USB
USB (Universal Serial Bus)
(1)
is a very popular industry standard that defines cables,
connectors, and protocols used for communication and power supply between devices.
USB-C (USB Type-C connector) is the latest version of the USB connector, developed
by the USB Implementation Forum (USB-IF). USB-C connector
(2)
supports both USB
HOST and USB DEVICE modes. This enables MCUs equipped with the USB peripheral
to act either as a USB HOST or as a USB DEVICE, allowing development of a range of
various USB based applications.
The USB mode selection is done using an a specialized controller IC solution. This IC
provides Configuration Channel (CC) control logic detection and indication functions.
The HOST/DEVICE detection pin (USB ID), as well as the HOST/DEVICE configuration
pin (USB PSW) of the MCU, can be connected with the logic control circuit by using the
DIP switch (SW6), located in the BOARD SETUP section:
SW6.9
ON (up):
connects the HOST/DEVICE configuration pin of the MCU with the
PTN5150 logic control circuit;
OFF (down):
disconnects the HOST/DEVICE configuration pin from the
PTN5150 logic control circuit
SW6.10
ON (up):
connects the HOST/DEVICE detection pin of the MCU with
the logic control circuit;
OFF (down):
disconnects the HOST/DEVICE detection pin from the logic
control circuit
To set up EasyPIC v8 for PIC24/dsPIC33 development board as the USB HOST, the PSW
pin should be set to a LOW logic level (0) by the MCU. If set to a HIGH logic level the
development board acts as a DEVICE. In HOST mode, EasyPIC v8 for PIC24/dsPIC33
development board provides the power over the USB-C connector for the attached
device. The USB ID pin is used to detect the type of the device attached to the USB
port, according to USB OTG specifications: the USB ID pin connected to GND indicates
a HOST, while the USB ID pin set to a high impedance state (HI-Z) indicates that the
connected peripheral is a DEVICE.
When a PIC MCU does not support USB interface or USB connection is not required
by application itself, the USB pins should be disconnected from the USB-C connector