Microchip Technology MCP3901 ADC Evaluation Board for 16-Bit MCUs User guide

MCP3901 ADC Evaluation Board
for 16-Bit MCUs User’s Guide
2010 Microchip Technology Inc. DS51845B
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
EELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART,
32
PIC
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, 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.
© 2010, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 978-1-60932-571-8
Microchip received ISO/TS-16949:2002 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.
®
MCUs and dsPIC® DSCs, KEELOQ
®
code hopping
DS51845B-page 2 2010 Microchip Technology Inc.
MCP3901 ADC EVALUATION BOARD
FOR 16-BIT MCUs USER’S GUIDE
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................................................................................... 7
Chapter 1. Hardware Description
1.1 Overview ............. ........................................................................................... 9
1.2 PIM Module/MCP3901 Connection and Peripheral Usage Overview ..........11
1.3 MCP3901 Delta-Sigma Sampling/MCLK Options ........................................12
1.4 Analog Input Structure ......................................... .........................................13
1.5 Universal Serial Bus (USB) ..........................................................................13
Chapter 2. Firmware
2.1 DSPIC33 F irmware Descrip tion ..... .. ............. .. .. ........................................... 1 5
2.2 Data Acquis it io n ..................................................... ...................................... 16
2.3 UART Comm u n ic a tio n P ro t oc o l ................................................. .. .. .............. 18
Chapter 3. MCP3901 PC Software Tool
3.1 Software Ove r view ... .................................................................. .. .. .............. 21
3.2 Setting the C o n fig u r a tio n o f th e ADC ........ .. ................................................. 22
3.3 Connectivity and Recording Length .............................................................22
3.4 Scope Plot Window - Time Domain Analysis ...............................................22
3.5 Histogram Window – Noise Analysis .................................................... .. ......22
3.6 FFT Window – Fr e que n c y Dom a i n An a ly s is ........ ........................................ 23
2010 Microchip Technology Inc. DS51845B-page 3
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
Appendix A. Schematics and Layouts
A.1 Introduction .................................................................................................. 25
A.2 Schema tic – An a l og ........... ........................................ .. .. ........................... .. . 26
A.3 Schematic – LCD and UART ................ .......................... ... .. ....................... 27
A.4 Schema tic – USB and Memory .... . .. ............. ... .. .......................... ... .. ............ 28
A.5 Schematic – Microcont ro ller (MCU) ................ .......................... .. ... .............. 29
A.6 Schematic – PIM Module ............................................................................. 30
A.7 Schematic – Power ................ ...................................................................... 31
A.8 Board – Top Trace and Top Silk ..................................................................32
A.9 Board – Bott o m Tr a ce a nd B o tt o m Si lk .. ...................................................... 32
A.10 Board – Lay e r #2 VD D ...... ........................................ .. .. ............................ 33
A.11 Board – Layer #3 GND .............................................................................. 33
A.12 Board – Top Silk and Pads ........................................................................34
A.13 Board – Bottom Top Silk and Pads ............................................................ 34
Appendix B. Bill Of Materials (BOM)
Worldwide Sales and Service .....................................................................................38
DS51845B-page 4 2010 Microchip Technology Inc.
MCP3901 ADC EVALUATION BOARD
FOR 16-BIT MCUs USER’S GUIDE

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 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 on-line help files.
®
IDE on-line help.

INTRODUCTION

This chapter contains general information that will be useful to know before using the MCP3901 ADC Evaluation Board for 16-Bit MCUs. 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 MCP3901 ADC Evaluation Board for 16-Bit MCUs as a development tool to emulate and debug firmware on a target board. The manual layout is as follows:
Chapter 1. “Hardwa re Desc ript ion ”– Provides important information about the MCP3901 ADC Evaluation Board for 16-Bit MCUs hardware.
Chapter 2. “Firmware” – Describes the MCP3901 ADC Evaluation Board for 16-Bit MCUs firmware.
Chapter 3. “MCP3901 PC Software Tool” – Provides detailed information about board’s PC software tool.
Appendix A. “Schematics and Layouts”– Shows the schematic and board layouts for the MCP3901 ADC Evaluation Board for 16-Bit MCUs.
Appendix B. “Bill Of Materials (BOM)” – Lists the parts used to build the MCP3901 ADC Evaluation Board for 16-Bit MCUs.
2010 Microchip Technology Inc. DS51845B-page 5
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide

CONVENTIONS USED IN THIS GUIDE

This manual uses the following docum entat io n conven tion s:
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic chara c ters Referenced books MPLAB
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
dialog
Underlined, italic text with right angle bracket
Bold characters A dialog button Click OK
N‘Rnnnn A number in verilog format,
Text in angle brac kets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Italic Courier New A variable argument file.o, where file can be
Square brackets [ ] Optional arguments mcc18 [options] file
Curly brackets and pipe character: { | }
Ellipses... Replaces r epeated text var_name [,
A menu path File>Save
A tab Click the Power tab
where N is the tota l number of digits, R is th e radi x and n is a digit.
Filenames autoexec.bat File paths c:\mcc18\h Keywords _asm, _endasm, static Command-line options -Opa+, -Opa- Bit values 0, 1 Constants 0xFF, ‘A’
Choice of mut ually exclus ive arguments; an OR selection
Represents code supplied by user
“Save project before build”
4‘b0010, 2‘hF1
any valid filename
[options] errorlevel {0|1}
var_name...] void main (void)
{ ... }
®
IDE User’s Guide
DS51845B-page 6 2010 Microchip Technology Inc.

RECOMMENDED READING

This user's guide describes how to use MCP3901 ADC Evaluation Board for 16-Bit MCUs. Other useful documents are listed below. The following Microchip document is available and recommended as supplemental reference resources:
MCP3901 Data Sheet - “Two Channel Delta Sigma A/D Converter”, DS22192

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.

DOCUMENT REVISION HISTORY

Revision A (July 2009)
• Initial Release of this Document.
Revision B (October 2010)
• Minor grammatical changes throughout document. No technical information has changed.
2010 Microchip Technology Inc. DS51845 B-page 7
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
NOTES:
DS51845B-page 8 2010 Microchip Technology Inc.

1.1 OVERVIEW

The MCP3901 ADC Evaluation Board for 16-Bit MCUs system provides the ability to evaluate the performance of the MCP3901 dual channel ADC. It also provides a development platform for 16-bit PIC Plug-in Module (PIM) systems compatible with the Explorer 16 and other high pin count PIC MCU demo boards. The system comes with programmed dsPIC33FJ256GP710 PIM modules that communicate with the LabVIEW™ software GUI for data exchange and ADC setup.
1.1.1 Feature Highlights
• Dual ADC MCP3901 output display using serial communication to PC software
• Simultaneous 4 ksps at 90 dB SINAD and top speed of 55 ksps performance on
• System and ADC performance analysis through graphical PC tools showing noise
• Robust hardware design with analog grounding and analog/digital separation,
• PICtail™ Plus connectors for Explorer 16 daughter board compatibility
MCP3901 ADC EVALUATION BOARD
FOR 16-BIT MCUs USER’S GUIDE

Chapter 1. Hardware Description

®
MCU-based applications, using existing 100-pin
interface
dual MCP3901 channels
histogram, frequency domain (FFT), time domain scope plot, and statistical numerical analysis
allowing low noise evaluation of MCP3901 devices. Separate power supplies and power planes – 4 layer board
2010 Microchip Technology Inc. DS51845B-page 9
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
PIM (100-PIN)
PIC18F86J65
MCP3901
EXT +5V
SRAM
EXT +5V +9V IN USB
CH0+
CH0-
GND
CH1+
CH1-
GND
+
G
-
+
G
-
+
-
MCP3901 ADC Evaluation Board for 16-Bit MCUs
PIM RESET
SW2
SW3
SW4
PIC18 AUX I/O
PIC18 EXTERNAL I/O
MCP3901
Digital I/O
9V EXT. IN
USB
PWR LED
(Blue)
RA9
RA10 +5V REG
+3V REG
PICtail™ Plus
PIC18 ICD
PIC18 ICD
Serial Connector
FIGURE 1-1: MCP3901 ADC Evaluation Board for 16-Bit MCUs.
DS51845B-page 10 2010 Microchip Technology Inc.
Hardware Description
CONTROL SWITCHES (X3)
CH0+
CH0-
CH1+
CH1-
AVDD
AGND
OSC1
MCP3901
MDAT0
SDI
SDO
RA5
RA4
SCK1/RF6
SDO1/RF8
SDI1/RF7
RB8/9/10
PIM Module
SCK
OSC2
OC1/RD0
RA9/10
D6 D7
(Green)
RF3/U1TX
RF2/U1RX
UART SERIAL TO PC COMMUNICATION
MDA T1
RESET
DR CS
SPI Serial
Interface
Delta Sigma Multi-Level Modulator
Delta Sigma Multi-Level Modulator
PGA
PGA
+
+
-
-
INT V
REF
Clock Generation/ Phase Correction
Current Boost
Circuit
Modulator
Output
Translation
Block
SINC3
Digital Filter
SINC3
Digital Filter
DGND DVDD
INT3/RA4
IC4/RD11 IC3/RD10

1.2 PIM MODULE/MCP3901 CONNECTION AND PERIPHERAL USAGE OVERVIEW

The MCP3901 ADC Evaluation Board for 16-Bit MCUs contains a 100-pin PIM socket compatible with Microchip’s PIM modules. The system comes with 2 PIM modules: the PIC24FJ128GA010 and dsPIC33FJ256GA710.
A complete description of the firmware programmed with these two modules is available in Chapter 1. “Hardware Description”.
FIGURE 1-2: Digital Connection Overview PIM/MCP3901 Connections.
Ports A, B, and D are used for signals such as push buttons, output LEDs, CS MCLR
(for MCP3901 data mode setting). Output Capture 1 is used for MCP3901’s
clock generation. Serial communication is achieved through the MSSP module 1.
and
2010 Microchip Technology Inc. DS51845B-page 11
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
XTAL XTAL PIM OC1
CLKIN
CLKIN
CLKOUT
XTAL XTAL PIM OC1
CLKIN
CLKIN
CLKOUT

1.3 MCP3901 DELTA-SIGMA SAMPLING/MCLK OPTIONS

The MCP3901 device is an ADC with a second order modulator and a third order sync filter. This Delta-Sigma A/D converter has an adjustable oversampling ratio. The CLKIN pin of the MCP3901 is the oversampling clock (MCLK) input. The MCP3901 ADC Evaluation Board for 16-Bit MCUs offers two different options for the MCP3901 master clock (MCLK).
1.3.1 Using the Crystal X2
The MCP3901 ADC Evaluation Board for 16-Bit MCUs is populated with a 3.58 MHz crystal, which is used as a clock source by placing jumpers in the following position on the MCP3901 Digital I/O header block:
FIGURE 1-3: ADC Clock Selection Jumpers – External Crystal.
1.3.2 Driving the Clock with the PIM Module
The PIC MCU can be used to generate the CLKIN (MCLK) signal for the MCP3901, setting the ADC sample rate through the use of the output compare module OC1. To use this, make the following jumper change to the MCP3901 Digital I/O header block:
FIGURE 1-4: ADC Clock Selection Jumpers – Clock from MCU.
The frequency of the OC1 output is based on the PR1 bits settings in the firmware (for both PIC24 and dsPIC33 PIM modules supplied with this system). The signal frequency from OC1 can be changed by the user from the PS software by changing the value in the sampling rate control box. A low number will generate a high frequency sig­nal. The value of the sampling rate, which is directly proportional with the clock frequency from OC1, is indicated in the sampling speed indicator box in the PC software (see Figure 3-1) .
DS51845B-page 12 2010 Microchip Technology Inc.
+ 26 hidden pages