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 t he lik e is provided only for your convenience
and may be su perseded by upda t es . It is y our 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 supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
K
logo, rfPIC and UNI/O are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL 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, chipKIT,
chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net,
dsPICworks, dsSPEAK, ECAN, ECONOMONITOR,
FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP,
Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB,
MPLINK, mTouch, Omniscient Code Generation, PICC,
PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE,
rfLAB, Select Mode, Total Endurance, TSHARC,
UniWinDriver, 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:2009 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial 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 p age 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.
For the most up-to-date information on development tools, see the MPLAB
Select the Help menu, and then Topics to open a list of available online help files.
®
IDE online help.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
MCP47X6 PICtail™ Plus Daughter 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 MCP47X6 PICtail™ Plus Daughter Board as
a development tool to emulate and debug firmware on a target board. The manual layout is as follows:
• Chapter 1. “Quick Start Instructions” – this chapter provides an overview of the
MCP47X6 PICtail™ Plus Daughter Board and instructions on how to program the
DAC register and EEPROM of the MCP4706/MCP4716/MCP4726 devices.
• Appendix A. “Schematic and Layouts” – shows the schematic and layout
diagrams for the MCP47X6 PICtail™ Plus Daughter Board.
• Appendix B. “Bill Of Materials (BOM)” – lists the parts used to build the
MCP47X6 PICtail™ Plus Daughter Board.
This user's guide describes how to use MCP47X6 PICtail™ Plus Daughter Board. The
following Microchip documents are available and recommended as supplemental
reference resources.
PICkit™ Serial Analyzer User’s Guide (DS51647)
Consult this document for instr ucti ons on how to use the PICkit™ Serial Analyzer
hardware and software.
MCP4706/MCP4716/MCP 472 6 Data Sheet, “8-/10- /12 -Bi t Voltage Output
Digital-to-Analog Converter with EEPROM Memory” (DS22272)
This data sheet provides deta iled information regarding the MCP47x6 product family.
PIC24FJ128GA010 Family Data Sheet (DS39747)
Explorer 16 Development Board User’s Guide (DS51589)
AN1079, “Using the C30 Compiler and the I2C Peripheral to Interface Serial
EEPROMs with dsPIC33F” (DS01079)
THE MICROCHIP WEB SITE
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
Preface
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or field application engineer
(FAE) 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.
The following sections provide an overview of the MCP47X6 PICtail™ Plus Daughter
Board and demonstrate how to: (a) use these devices in a 16-bit MCU environment and
(b) evaluate these device’s features using the PICkit™ Serial Analyzer (P/N:
DV164122). The MCP47X6 PICtail™ Plus Daughter Board is designed to work with
both the Explorer 16 Development Board (P/N: DV164033) and the PICkit
Analyzer (P/N: DV164122).
The following topics are covered:
• Description of the MCP47X6 PICtail™ Plus Daughter Board.
• How to use the MCP47X6 PICtail™ Plus Daughter Board with the Explorer 16
Starter Kit.
• How to use MCP47X6 PICtail™ Plus Daughter Board with the PICkit
Analyzer.
MCP47X6 PICtail™ PLUS DAUGHTER
BOARD USER’S GUIDE
™
Serial
™
Serial
Note 1:If you use the PIC Explorer 16, you need Sections 1.4
™
2:If y ou us e th e PIC kit
Serial Analyzer, you need Sections 1.6 — 1.8 only.
— 1.5 only.
1.2DESCRIPTION OF THE MCP47X6 PICtail™ PLUS DAUGHTER BOARD
The MCP47X6 PICtail™ Plus Daughter Board (P/N ADM00317) contains the
MCP4706 (8-bit DAC), MCP4716 (10-bit DAC), and MCP4726 (12-bit DAC) devices.
These DAC devices are communicating with the external Master device (MCU) using
2
I
C serial interface communication. The MCP47X6 PICtail™ Plus Daughter Board
does not include the Master device (MCU), but it has two interface connectors that can
be used for the external device, which has the Master device (MCU) to communicate
with this board. The two interfaces are:
(a) Connector (J3) for Explorer 16 Starter Kit (P/N: DV164033) for 16-bit MCU
environment. The firmware for the 16-bit MCU is provided with this board.
(b) 6-pin connector (J1) for PICkit™ Serial Analyzer (P/N: DV164122) for reading and
writing the DAC registers using the PICkit™ Serial Analyzer PC software.
The user can connect the MCP47X6 PICtail™ Plus Daughter Board to one of the above
tools and perform their own experiments.
These two external devices are used to control the DAC devices on the daughter
board. The user can choose one of these tools to use along with the daughter board.
The MCP47X6 PICtail™ Plus Daughter Board has test points for SCL and SDA, and
V
pads for each device. By connecting an oscilloscope to these test points (to SCL,
OUT
SDA, V
communications through the I
(V
OUT
) or a digital multimeter to the V
OUT
). Refer to Appendix A. “Schematic and Layouts”.
2C™
bus line and observe the resulting DAC output
pads, the user can examine the data
OUT
Note:The user can also control the DAC devices on the MCP47X6 PICtail™ Plus
Daughter Board by providing I
communication terminals on the daughter board, without using the Explorer
16 Development Board or the PICkit
J1 Connector Connector for PICkitTM Serial Analyzer.
Note: Do not use this pin when this b oard is us ed wi th the
Explorer 16 Development Board .
J3 Connector Connector for Explorer 16 Development Board.
Note: Do not use this pin when this b oard is us ed wi th the
TM
PICkit
Serial Analyzer.
External Reference Selection
Jumper Pins
JP1VDD connection through (a) J1 Connector for PICkitTM
JP2Connecting
V
DD
V
SS
V
1DAC output terminal f rom MCP4726 (12-bit DAC).
OUT
V
2DAC output terminal f rom MCP4716 (10-bit DAC).
OUT
V
SDAConnected to I
SCLConnected to I2CTM SCL line
3DAC output terminal from MCP4706 (8-bit DAC).
OUT
V
REF_EXT
(a) Connect pin 2 to “V
applied at the V
(b) Connect pin 2 to “
externally.
Note: This pin does not affect if VDD is selected a s
reference internally by the configuration bit setting.
Serial Analyzer, or (b) J3 Connector for Explorer 16
Development Board.
V
Note: Do n ot connect thi s jumper if yo u don’t need au dible
sounds.
(a) VDD monitoring terminal w hen JP 1 is co nnecte d (VDD
is provided by the external tools).
(b) VDD connection terminal when JP2 is disconnected.
You can connec t your own
Ground Reference
External Reference connection terminal
OUT
2CTM
REF_EXT
REF_EXT
V
DD
1 (MCP4726 output) to Buzzer.
SDA line
” if external reference is
pin.
” if VDD is used as reference
V
to this pin.
DD
VR1Volume control for Buzzer 1.
Note: Disconnect JP2 if you don’t need audible sounds.
1.3I2C ADDRESS BYTE FOR EACH DEVICE
Each DAC device on the board has its own I2C address bits which are preprogrammed
at the factory. Table 1-2 shows the I
1.4GETTING STARTED WITH THE EXPLORER 16 DEVELOPMENT BOARD
This section describes how to use the MCP47X6 PICtail™ Plus Daughter Board with
the Explorer 16 Development Board.
After receiving the MCP47X6 PICtail™ Plus Daughter Board, program the 16-bit
PIC24FJ128 MCU on the Explorer 16 Starter Kit using the firmware provided. The user
can download the latest firmware from the Microchip website: www.microchip.com.
• Step 1: Insert the MCP47X6 PICtail™ Plus Daughter Board to the Explorer 16
Development Board. Figure 1-2 shows the configuration when the board is
connected to the Explorer 16 Development Board.
• Step 2: Program the Explorer 16 Development Board using the firmware provided
with this board. Figure 1-3 shows the connection of the MPLAB ICD2 with the
Explorer 16 Development Board for programming.
• Step 3: Once the programming is done, disconnect the MPLAB ICD2 from the
Explorer 16 Development Board.
• Step 4: Now you can evaluate the performance of the DAC devices. The LCD on
the Explorer 16 Development Board will display instructions on how to select the
DAC device using the push button switches on the Development Board: (a) S3 for
MCP4726, (b) S6 for MCP4716, and (c) S5 for MCP4706. S4 is used to increment
the DAC code. If you hold down the S4 switch, the DAC code will increase
continuously until it reaches the maximum value, and then it starts from code 0
again. You can observe this event by simply connecting a voltmeter at the V
pin while holding down the S4 switch.
All procedures are very intuitive and interactive using the Push button switches and by
following the instructions on the LCD. The user can observe the DAC output (V
changes using an oscilloscope or voltmeter by pressing the S4 switch. The firmware
provided is an example that can be used as reference for the user’s applications.
1. Connect the MCP47X6 PICtail™ Plus Daughter Board to the J5 socket on the
Explorer 16 Development Board as shown in Figure 1-2.
MCP47x6
PICtail Plus
Daughter
Board
S3: Select MCP4726
S6: Select MCP4716
S5: Select MCP4706
S4: Increment DAC Code
Explorer 16 Development Board (P/N DV164033)
FIGURE 1-2:Connecting the MCP47X6 PICtail™ Plus Daughter Board to the
Explorer 16 Development Board.
1.5.1 Programming the PIC24FJ128 MCU
The Explorer 16 Development Board contains the PIC24FJ128 MCU. The user can
download the firmware to the MCU using the MPLAB ICD2 (or ICD3) programmer.
1.5.1.1THE PIC24FJ128 MCU FIRMWARE FOR THE MCP47X6 PICtail™ PLUS
DAUGHTER BOARD
The original firmware for the Explorer 16 Development Board is modified for the
MCP47X6 PICtail™ Plus Daughter Board demonstration. The firmware uses most of
the original code for the Explorer 16 Development Board except the I
control routines for the PIC24FJ128 MCU.
The following four routines are added or modified from the original Explorer 16
Development Board firmware:
• PIC24ExplDemo_MCP4726_Main.c
• MCP47x6_I2C_Func.c
• Banner_MCP4726_MCP4716_MCP4706.c
• I2C_MCP4726.h
The source codes are compiled by using Microchip’s C30 Compiler and the hex code
is programmed to the MCU using the MPLAB ICD 2. Figure 1-3 shows the connection
between the MPLAB ICD 2 and the Explorer 16 Development Board. Figure 1-4 shows
the MPLAB IDE programming environment.
1.5.1.2FIRMWARE FLOW CHART FOR THE MCP47X6 PICtail™ PLUS
DAUGHTER BOARD
Figure 1-5 shows the flow chart of the firmware. Once the MCU firmware is
programmed, the LCD will display instructions (with repeats) for the next steps. The
firmware us es fo u r push b ut t on sw i t ch es on th e Exp lorer 16 Development Boar d. Th e
features of the switches are:
• S3: Selecting MCP4726 (12-bit DAC). MCP4726 Output is available at V
• S6: Selecting MCP4716 (10-bit DAC). MCP4716 Output is available at V
• S5: Selecting MCP4706 (8-bit DAC). MCP4706 Output is available at V
• S4: Incrementing the DAC code using a write command (writing both DAC register
and EEPROM). The DAC output can be monitored at the V
Figure 1-6 for the V
waveform.
OUT
terminal. See
OUT
The Buzzer is connected to the MCP4726 output through JP2. Please disconnect JP2
if you don’t need audible sounds.
The firmware is interactive with push button switches. Table 1-3 shows the details of
the switches that are used.
The user can switch to other devices by using the device selection push button
switches (S3, S6 and S5) any time. The DAC output can be updated with the S4. The
DAC’s configuration bit settings that are used in the firmware are:
• Gain = 1x, Reference = Internal V
DD
OUT
OUT
OUT
1
2
3
TABLE 1-3:SWITCHES FOR THE FIRMWARE CONTROL
Switch to
Device
MCP4726
(12 bit DAC)
MCP4716
(10 bit DAC)
MCP4726
(8 bit DAC)
Device Selection
Switch
S3
S6V
S5V
1.5.1.3DAC OUTPUT (V
OUT
increment the
DAC Input
Code
)
S4
Output
Terminal
V
1
OUT
2
OUT
3
OUT
Configuration Bit
Settings
Gain = 1x,
= V
V
REF
DD
The MCP47X6 PICtail™ Plus Daughter Board has three DAC output terminals for each
DAC device.
•V
•V
•V
The user can observe the DAC outputs at the V
voltmeter or an oscilloscope. Figure 1-7 shows the I
1: Output from the MCP4726 (12-bit DAC)
OUT
2: Output from the MCP4716 (10-bit DAC)
OUT
3: Output from the MCP4706 (8-bit DAC)
OUT
test terminals using a digital
OUT
2
C clock (SCL) and data (SDA)
signals, and DAC output waveform.
Note:The DAC code is also programmed in EEPROM. The DAC devices on the
MCP47x6 Daughter Board will hold the latest settings when the power
supply is removed. When power supply is back on again (Example:
Remove the board from the Explorer 16 Development Board and connect
again), the same DAC output voltage with the previous settings will be
immediately available at the DAC output terminal.
1.6.1PICkit™ Serial Analyzer PC Soft ware Set-Up for the MCP47x6
Daughter Board
The following steps describe how to set up and use the PICkit™ Serial Analyzer PC
Graphic User Interface (GUI) to evaluate the MCP47X6 PICtail™ Plus Daughter Board.
1. Install the PICkit™ Serial Analyzer software onto your personal computer (PC).
2. Connect the USB cable between the PICkit™ Serial Analyzer and your PC.
3. Run the PICkit™ Serial PC Software. It will open up the graphic user interface
(GUI) as shown. Click the Next button and follow the instruct ions .
7. Select the VDD voltage of the MCP47X6 PICtail™ Plus Daughter Board and click
the
Next button.
Case 1: When you use VDD from the PICkit™ Serial Analyzer
If you choose PICkit™ Serial will power my device and 5 Volts as shown
below, the MCP47X6 PICtail™ Plus Daughter Board is powered by the 5V DC
(range between 4.85V ~ 5V) from the PICkit™ Serial Analyzer through the JP1
jumper. In this case, make sure that the JP1 jumper on the MCP47X6 PICtail™
Plus Daughter Board is connected.
Case 2: When you use your own V
Y ou can also provide your own VDD voltage by applying a VDD voltage at the VDD
terminal. In this case, make sure that the JP1 jumper is disconnected.
8. Click the OK button. You have made all of the PICkit™ Serial Analyzer
Configuration set-ups. You are now ready to program the MCP47X6 PICtail™
Plus Daughter Board using the PICkit™ Serial Analyzer.
In order to create a communication between the PICkit™ Serial Analyzer and the
MCP47X6 PICtail™ Plus Daughter Board, a script file is needed. The following
procedure shows how to create script files and how to use them.
Select Communication -----> Script ---> Script Builder.
Note:The MCP47X6 scripts are in a text file on the MCP47X6 PICtailTM Plus
Daughter Board’s product web page. The scripts can be copied into the
1.6.2.1CREATING SCRIPT FILES TO PROGRAM DAC REGISTER AND
EEPROM
1. Click on WriteBlockAddrA8 in “Example I2C Scripts” column.
This will fill in the spaces under Script Detail column.
Modifying the Script Details Parameters:
2. Under the Script Detail column, select the item in the parameter box.
3. Right click the mouse button and an option box appears to the right of your
selection. This gives you the options that are available for the parameter
selected. Select the desired option.
4. Keep the parameters in the same order as shown below.
The following example shows how to create a script file for a Write command (DAC
register and EEPROM) for the MCP4726.
1.Choose these boxes and
right click the mouse button for options available.
2.You can also change the
values or delete the boxes.
3.Make sure the listed
parameters in th e “Script
Detail” should be in the
exact order as shown here.
4. Change the parameter value.
Script Detail
I2CSTART
I2CWRTBYT
04
C0
60
FF
F0
I2CSTOP
Note:All the 8 parameters above must be listed in order. The parameters with * are not
modifiable. Address bits for the MCP4726 is (A2,A1,A0) = (0,0,0). You can
choose any data bit you want in the 3rd and 4th bytes. If you use the above write
data, the MCP4726 device will output:
1.6.2.2SAVING THE SCRIPT FILE AND PROGRAMMING DAC REGISTER
(WRITING BOTH DAC REGISTER AND EEPROM)
1. Change the 3rd and 4th data bytes, if desired, in the Script Detail column.
2. Type in any script name (i.e., MCP4726_WriteEE) in the space below the Script
Name menu.
3. Click Save Script button.
4. Click Execute Script button.
Note:At this point, the PICkit™ Serial transmits a write command of “Write DAC
Register and EEPROM” to the MCP4726 device (address = 000). The
saved file name will appear in Users I2C Scripts column and can be
reused at any time by selecting the file name.
5. The analog output voltage of the MCP4726 will be monitored at V
on the Daughter Board.
Note:When you click on the “Execute Script” menu, the “Busy” LED on the PICkit
Serial Analyzer will momentarily turn on and then turn off. If the LED
remains ON, a communications problem has occurred. Remove the PICkit
Serial Analyzer from the personal computer and recheck the parameter
value in the order of the parameters under the Script Detail column. Try
again until the “Busy” LED goes OFF after executing the write command.
One of the important features of the MCP4706 devices is the nonvolatile memory.
When the device is first powered up, it outputs an analog voltage corresponding to the
data in the EEPROM. The user can confirm this feature using the following procedures:
1. Program the EEPROM memory. Refer to Section 1.6.2.1 “Creating Script
Files to Program DAC Register and EEPROM”.
2. Remove power (V
remove the daughter board from the PICkit™ Serial Analyzer.
3. Reconnect power (V
to the PICkit™ Serial Analyzer.
4. You can confirm that the programmed DAC output at the DAC output terminal
(V
1, V
OUT
OUT
1.6.4Reading both the DAC Register and EEPROM data:
You can read back the DAC code stored in the DAC register and EEPROM with the
following steps:
1. Create a read command script file name as shown below and execute it.
2. The results (DAC code and EEPROM data) will appear on the PICkit™ Serial
Transactions page.
) from the MCP47X6 PICtail™ Plus Daughter Board, or
DD
) to the Daughter Board or reconnect the Daughter Board
The examples shown in the previous sections use the I2C address bits of the MCP4726
(A2, A1, A0 = 0,0,0). The same procedure is also applicable for the remaining
two devices (MCP4706, MCP4716) by simply using the right address byte for each
device. Table 1-2 shows the address byte of each device. Refer to the
MCP4706/MCP4716/MCP4726 Data Sheet for the data format of each command.