MCP2221 I
2
C DEMONSTRATION
BOARD USER’S GUIDE
2016 Microchip Technology Inc.
DS50002480A-page 39
Chapter 4. Creating Custom I
2
C Software Applications
This chapter provides a few suggestions on how to get started in developing custom
applications that involve I
2
C communication, using the MCP2221 I
2
C Demonstration
Board.
Section 4.1 “USB to I
2
C”
: The MCP2221 is the I
2
C master and the Graphical User
Interface (GUI) lies on a USB Host (such as a PC or Android device).
Section 4.2 “PIC16F1509 as I
2
C Master”
: The PIC16F1509 which is available on the
board (or a pin-compatible PIC
®
microcontroller) is presumed to be the I
2
C master,
while also using (or not) the MCP2221.
Section 4.3 “I
2
C Slave Addresses”
: Lists the I
2
C slave addresses of the devices
found on the demonstration board.
4.1
USB TO I
2
C
This section discusses two aspects of a USB to I
2
C custom application:
• Interfacing the MCP2221 I
2
C Demonstration Board from a different PC
application, or even, an operating system.
• Connecting external I
2
C slaves to the MCP2221 I
2
C Demonstration Board.
4.1.1
Using a Different Operating System or Application
The MCP2221 can be accessed via USB from several types of operating systems:
Windows
®
, Linux
®
, Mac
®
or Android. The required USB drivers and related information
are available on the MCP2221 official web site.
Also available for download are several applications that can be used for I
2
C transfer
and for GPIO pin configuration, such as the MCP2221 I
2
C/SMBus Terminal for
Windows or the MCP2221 Terminal Android Application for Android.
In order to create a custom application (GUI), the user can call the MCP2221 associ-
ated functions (for its configuration or actual data transfer) through the DLL files that
can be downloaded from the same location.
For Android, the source code for the application and the available libraries can be used
as a basis for developing a new application.
See the
“Recommended Reading”
section for more information on the I
2
C slave
devices.
4.1.2
Connecting External I
2
C Slaves to the Board
The MCP2221 I
2
C Demonstration Board also provides the possibility to connect
external I
2
C slave devices using the female connector J25. This is same as the one
from the PICkit™ Serial Analyzer in terms of I
2
C connectivity. The white colored triangle
indicates the first pin of the socket.
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from