Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and the like is provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, microID, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE, PowerSmart, rfPIC and SmartShunt are
registered trademarks of Microchip Technology Incorporated
in the U.S.A. and other countries.
AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB,
SEEVAL, SmartSensor and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, ECAN,
ECONOMONITOR, FanSense, FlexROM, fuzzyLAB,
In-Circuit Serial Programming, ICSP, ICEPIC, Linear Active
Thermistor, Mindi, MiWi, MPASM, MPLIB, MPLINK, PICkit,
PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal,
PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB,
rfPICDEM, Select Mode, Smart Serial, SmartTel, Total
Endurance, UNI/O, WiperLock and ZENA are trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona, Gresham, Oregon and Mountain View, California. The
Company’s quality system processes and procedures are for its
PICmicro
EEPROMs, microperipherals, nonvolatile memory and analog
products. In addition, Microchip’s quality system for the design and
manufacture of development systems is ISO 9001:2000 certified.
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
MCP23X17 Evaluation Board. Items discussed in this chapter include:
• Document Layout
• Conventions Used in this Guide
• Recommended Reading
• The Microchip Web Site
• Customer Support
• Document Revision History
DOCUMENT LAYOUT
This document describes how to use the MCP23X17 Evaluation Board as a development tool to emulate and debug firmware on a target board. The manual layout is as
follows:
• Chapter 1. “Product Overview” – Important information about the MCP23X17
Evaluation Board.
• Chapter 2. “Installation and Operation” – Includes instructions on how to get
started with the MCP23X17 Evaluation Board.
• Appendix A. “Schematic and Layouts” – Shows the schematic and layout
diagrams for the MCP23X17 Evaluation Board.
• Appendix B. “Bill Of Materials (BOM)” – Lists the parts used to build the
MCP23X17 Evaluation Board.
Choice of mutually exclusive
arguments; an OR selection
Represents code supplied by
user
®
format,
“Save project before build”
4‘b0010, 2‘hF1
any valid filename
[options]
errorlevel {0|1}
var_name...]
void main (void)
{ ...
}
RECOMMENDED READING
For more information regarding the Stand-Alone CAN controller, CAN I/O expander,
and CAN transceiver devices, refer to the appropriate data sheet. Table 1-1 shows the
device and associated data sheet literature number. These documents can be downloaded from the Microchip web site at: www.microchip.com.
TABLE 1-1:DEVICES AND DATA SHEET LITERATURE NUMBERS
Microchip provides online support via our web site at www.microchip.com. This web
site is used as a means to make files and information easily available to customers.
Accessible by using your favorite Internet browser, the web site contains the following
information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
• Development Systems Information Line
Customers should contact their distributor, representative or field application engineer
for support. Local sales offices are also available to help customers. A listing of sales
offices and locations is included in the back of this document.
Technical support is available through the web site at: http://support.microchip.com
Preface
DOCUMENT REVISION HISTORY
Revision B (August 2006)
• Add disclaimer to Bill of Materials regarding RoHS-Compliant part numbers.
This chapter provides an overview of the MCP23X17 Evaluation Board and covers the
following topics:
• What is the MCP23X17 Evaluation Board?
• What the MCP23X17 Evaluation Board kit includes
1.2WHAT IS THE MCP23X17 EVALUATION BOARD?
The MCP23X17 Evaluation Board allows the system designer to evaluate the operation
of the MCP23X17 General Purpose I/O (GPIO) expander. The board demonstrates the
MCP23X17 performance in a simple circuit (4 inputs and 12 outputs).
1.3WHAT THE MCP23X17 EVALUATION BOARD KIT INCLUDES
This MCP23X17 Evaluation Board Kit includes:
• One MCP23X17 Evaluation Board
- MCP23017 GPIO Expander with I
- MCP23S17 GPIO Expander with SPI interface (installed)
• One AIPD Evaluation Board
• Analog and Interface Products Demonstration Boards CD-ROM (DS21912)
This chapter discusses the setup and operation of the MCP23X17 Evaluation Board.
The MCP23X17 Evaluation Board is designed to demonstrate simple, low-cost
input/output expansion using the MCP23X17 devices and a low-cost PICmicro
microcontroller.
Four MCP23X17 pins are configured as inputs and connected to four momentary push
buttons. The remaining twelve GPIO pins are configured as outputs and connected to
LEDs. Each button causes the LEDs to sequence in a predetermined pattern.
The MCP23X17 is provided in small, space-saving 18-lead SSOP packages.
2.2FEATURES
The MCP23X17 Evaluation Board has the following features:
• Two 16-bit GPIO Expanders
- MCP23017 with I
- MCP23S17 with SPI interface
• Slide switch for selecting between the two GPIO expanders.
• Four momentary buttons and twelve LEDs, each connected to an individual GPIO
pin to demonstrate the input/output functionality of the MCP23X17.
• Headers for the MCP23X17 pins to allow evaluation in a user defined application.
• Jumpers (not populated, but shorted by a trace on the bottom of the PCB) to
isolate the MCP23X17 from the LEDs and buttons, so they can be evaluated in a
custom circuit.
1. MCP23017 and MCP23S17 - The two devices under evaluation/demonstration.
Both devices are connected to the same inputs and outputs and selector switch
is used to select which device the PICmicro controls. A mux is used to route the
serial (I
2. LEDs - These are connected to the MCP23X17 GPIO configured as outputs.
3. Momentary Buttons - These are connected to the MCP23X17 configured as
inputs.
4. PIC16F818 - Reads the selector switch and controls the MCP23X17 devices.
5. Headers - There are two headers which are connected to the MCP23X17 pins to
allow off-board connections.
6. Jumpers - The jumpers are used to isolate the MCP23X17 pins so they can be
connected to an off-board circuit. The jumpers are not populated, however, they
are shorted by a trace on the bottom of the PCB.
7. Power - The boards can be powered by 9V via the power jack (J2) or by applying
5V directly to the power points (TP1 and TP2).
2.5FIRMWARE DESCRIPTION
2
C or SPI) from the PICmicro to the MCP23X17.
See Figure 2-2 for the main firmware flow diagram
1. The firmware first configures the PIC16F818 microcontroller.
2. The firmware configures the MCP23X17 devices (4-inputs, 12-outputs, enable
interrupts, etc.).
3. The firmware checks the selector switch to determine which MCP23X17 to
communicate with during the main loop.
4. The “other” MCP23X17 is configured to all inputs so that it does not cause
contention on LED connections.
5. The MCP23X17 inputs are sampled.
6. The LEDs light up in a pattern as defined by the button which was pressed. If no
button is pressed, the LEDs maintain the current sequence.