Mcp47X6 Pictail™ Plus Daughter Board User'S Guide: © 2011 Microchip Technology Inc. Ds51932B
Mcp47X6 Pictail™ Plus Daughter Board User'S Guide: © 2011 Microchip Technology Inc. Ds51932B
Mcp47X6 Pictail™ Plus Daughter Board User'S Guide: © 2011 Microchip Technology Inc. Ds51932B
PICtail Plus
Daughter Board
Users Guide
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 Microchips 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 Microchips 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.
ISBN: 978-1-61341-709-6
Table of Contents
Preface ........................................................................................................................... 5
Introduction............................................................................................................ 5
Document Layout .................................................................................................. 5
Conventions Used in this Guide ............................................................................ 6
Recommended Reading........................................................................................ 7
The Microchip Web Site ........................................................................................ 7
Customer Support ................................................................................................. 7
Document Revision History ................................................................................... 8
Chapter 1. Quick Start Instructions
1.1 Introduction ..................................................................................................... 9
1.2 Description of the MCP47X6 PICtail Plus Daughter Board ........................ 9
1.3 I2C Address Byte for Each Device ............................................................... 11
1.4 Getting Started With the Explorer 16 Development Board ........................... 12
1.5 Connecting to the Explorer 16 Starter Kit ..................................................... 13
1.6 Getting Started with PICkit Serial Analyzer .............................................. 20
1.7 Examples for Other Devices (MCP4706, MCP4716) ................................... 30
1.8 Programming Example using the PICkit Serial Analyzer .......................... 31
Appendix A. Schematic and Layouts
A.1 Introduction .................................................................................................. 33
A.2 Board Schematic ....................................................................................... 34
A.3 Board Top Silk and Pads .......................................................................... 35
A.4 Board Top Copper, Top Pads and Top Silk .............................................. 36
A.5 Board Bottom Silk and Pads .................................................................... 37
A.6 Board Bottom Copper, Bottom Pads and Silk ........................................... 38
Appendix B. Bill Of Materials (BOM)
Worldwide Sales and Service .................................................................................... 40
Preface
NOTICE TO CUSTOMERS
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.
For the most up-to-date information on development tools, see the MPLAB IDE online help.
Select the Help menu, and then Topics to open a list of available online help files.
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 lay-
out 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.
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books MPLAB IDE Users Guide
Emphasized text ...is the only compiler...
Initial caps A window the Output window
A dialog the Settings dialog
A menu selection select Enable Programmer
Quotes A field name in a window or Save project before build
dialog
Underlined, italic text with A menu path File>Save
right angle bracket
Bold characters A dialog button Click OK
A tab Click the Power tab
NRnnnn A number in verilog format, 4b0010, 2hF1
where N is the total number of
digits, R is the radix and n is a
digit.
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Filenames autoexec.bat
File paths c:\mcc18\h
Keywords _asm, _endasm, static
Command-line options -Opa+, -Opa-
Bit values 0, 1
Constants 0xFF, A
Italic Courier New A variable argument file.o, where file can be
any valid filename
Square brackets [ ] Optional arguments mcc18 [options] file
[options]
Curly brackets and pipe Choice of mutually exclusive errorlevel {0|1}
character: { | } arguments; an OR selection
Ellipses... Replaces repeated text var_name [,
var_name...]
Represents code supplied by void main (void)
user { ...
}
RECOMMENDED READING
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 Users Guide (DS51647)
Consult this document for instructions on how to use the PICkit Serial Analyzer
hardware and software.
MCP4706/MCP4716/MCP4726 Data Sheet, 8-/10-/12-Bit Voltage Output
Digital-to-Analog Converter with EEPROM Memory (DS22272)
This data sheet provides detailed information regarding the MCP47x6 product family.
PIC24FJ128GA010 Family Data Sheet (DS39747)
Explorer 16 Development Board Users Guide (DS51589)
AN1079, Using the C30 Compiler and the I2C Peripheral to Interface Serial
EEPROMs with dsPIC33F (DS01079)
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.
Note 1: If you use the PIC Explorer 16, you need Sections 1.4 1.5 only.
2: If you use the PICkit Serial Analyzer, you need Sections 1.6 1.8 only.
Note: The user can also control the DAC devices on the MCP47X6 PICtail Plus
Daughter Board by providing I2C commands through the interface
communication terminals on the daughter board, without using the Explorer
16 Development Board or the PICkitTM Serial Analyzer.
104-00317-R1
FIGURE 1-1: Front and Back Views of the MCP47X6 PICtail Plus Daughter
Board.
MCP47x6
PICtail Plus
Daughter
Board
FIGURE 1-2: Connecting the MCP47X6 PICtail Plus Daughter Board to the
Explorer 16 Development Board.
1.5.1.1 THE 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 I2C peripheral
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 Microchips 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.
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.
POWER-UP START
NO
Is Any Device Selected?
(S3: MCP4726, S6: MCP4716, S5: MCP4706)
YES
Turn on LED
(D9: MCP4726, D7: MCP4716, D3: MCP4706)
Is S4 Pressed?
YES
NO
DAC Code = FSR?
YES
YES
Turn on LED
(D9: MCP4726, D7: MCP4716, D3: MCP4706)
FIGURE 1-5: Flow Chart for the MCP47X6 PICtail Plus Daughter Board Firmware.
I2C
Clock Signal
(SCL)
I2C
Data Signal
(SDA)
I2C
Clock Signal
(SCL)
I2C
Data Signal
(SDA)
I2C
Clock Signal
(SCL)
A
A
I2C
Data Signal
(SDA)
VOUT
at VOUT Pin
FIGURE 1-7: I2C SCL, SDA, and VOUT Waveforms for the MCP4726 While Incrementing the DAC
Code by 1 LSB. The Fast Write Command is Used for this Example.
DAC analog
Output (VOUT)
USB Cable: Connected between the PICkit Serial Analyzer and Personal Computer.
FIGURE 1-8: MCP47X6 PICtail Plus Daughter Board with the PICkit Serial Analyzer.
4. Select the Communication Mode type: I2C Master, and click the Next button.
Note: The MCP47x6 devices support the I2C bus data rate up to 3.4 MHz, but the
current version of the PICkit Serial Analyzer supports the I2C bus data
rate up to 400 kHz only.
Note: The MCP47X6 PICtail Plus Daughter Board has its own pull-up resistors,
therefore, you dont need additional pull-up resistors from the PICkit
Serial Analyzer.
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.
Note: The MCP47X6 scripts are in a text file on the MCP47X6 PICtailTM Plus
Daughter Boards product web page. The scripts can be copied into the
PICkitTM serials CommScripts.txt file.
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:
V
DD
FFF(hex)(V)
VOUT = ------------------------------------------------- = VDD ( V )
4096
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 VOUT1 terminal
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.
Script Detail
I2CWRTBYT *
I2CSTART *
03 -------> This means Master will send three bytes
C0 -------> 1st Write Byte: Address byte = 1100-0000
0F -------> 2nd Write Byte: 0000-FFFF (Data Byte)
FF -------> 3rd Write Byte: FFFF-FFFF (Data Nibble + Dont care Nibble)
I2CSTOP *
V DD Dn 5V 800 ( hex )
Now the device will output V OUT = ----------------------- = ---------------------------------- = 2.5V
4096 4096
3. Type in the script name (i.e., MCP4726_WriteF) in the space below the Script
Name menu.
4. Click the Execute Script button.
3 Bytes to Send
Requesting
6 Bytes
Written Data
using a Write Command
Reading Data
using a Read Command
(a) MCP4726
2.5V 2.5V 11
D = ----------- = ------------------------- = 2048 = 2
n INL 1.2207mV
Start 0xC0 ACK 0 0 PD1 PD0 D11 D10 D9 D8 ACK D7 D6 D5 D4 D3 D2 D1 D0 ACK STOP
(1 0 0 0 0 0 0 0 0 0 0 0)
0x08h 0x00h
11
Address Byte: = 2
when (A2 A1A0) = 000
(b) MCP4716
2.5V 2.5V 9
D = ----------- = ------------------------- = 512 = 2
n INL 4.8828mV
0x08h 0x00h
Address Byte: 9
= 2
when (A2 A1A0) = 001
(c) MCP4706
2.5V 2.5V 7
D = ----------- = ------------------------------- = 128 = 2
n INL 19.53125mV
0x00h 0x80h = 27
Address Byte:
when (A2 A1A0) = 010
FIGURE 1-10: Fast Mode Write Command for Targeted VOUT = 2.5V when VREF = 5V.