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 on-line help files.
®
IDE on-line help.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
MCP3903 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 MCP3903 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
hardware.
• Chapter 2. “Code example ”– Describes the firmware.
• Appendix A. “Schematics and Layouts”– Shows the schematic and board
layouts.
• Appendix B. “Bill of Materials (BOM)” – Lists the parts used to build the
MCP3903 ADC Evaluation Board for 16-Bit MCUs.
This User's Guide describes how to use MCP3903 ADC Evaluation Board for 16-Bit
MCUs. Other useful documents are listed below. The following Microchip document is
available and recommended as a supplemental reference resource:
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 MCP3903 ADC Evaluation Board for 16-Bit MCUs system lets users evaluate the
performance of the MCP3903 six-channel ADC. It also provides a development
platform for 16-bit PIC
compatible with the Explorer-16 and other high pincount PIC demo boards. The system
comes with programmed PIC24FJ128GA010 PIM modules that communicate with the
LabView GUI for data exchange and ADC setup.
1.1.1Feature Highlights
• Six-channel ADC MCP3903 output display using serial communication to the
• Simultaneous 4 ksps at 91 dB Signal-to-Noise and Distortion Ratio (SINAD)
• System and ADC performance analysis through graphical PC tools showing Time
• Robust hardware design with analog grounding and analog/digital separation,
• Pigtail Plus connectors for Explorer-16 daughter board compatibility.
MCP3903 ADC EVALUATION BOARD
FOR 16-BIT MCUs USER’S GUIDE
Chapter 1. Hardware Description
®
MCU-based applications, using existing 100-pin PIM systems,
PC Software Interface and LCD
performance. The ADC can run up to 64 ksps.
domain scope plot, Frequency Domain (FFT), and statistical numerical analysis.
allowing low noise evaluation of the MCP3903 devices. Separate power supplies
and power planes - 4 layer board.
1.2PIM MODULE / MCP3903 CONNECTION AND PERIPHERAL USAGE
OVERVIEW
The MCP3903 ADC Evaluation Board for 16-Bit MCUs contains a 100-pin PIM socket,
compatible with Microchip’s PIM modules. The system comes with a PIM module: the
PIC24FJ128GA010.
For a complete description of the firmware programmed with these two modules, see
Ports A, B, and D are used for signals such as push buttons, output LEDs, CS
MCLR
(for MCP3903 data mode setting). Output Capture 1 is used for MCP3903’s
and
clock generation. Serial communication is achieved through the MSSP module 1.
The MCP3903 device is an ADC with a second order modulator and a third order sync
filter . This Delt a-Sigma A/D co nverter has an adj ustable ov ersampling rat io. The CLKIN
pin of the MCP3903 is the ADC’s clock (MCLK) input. The MCP3903 ADC Evaluation
Board for 16-Bit MCUs offers two different options for the MCP3903 master clock
(MCLK).
MCP3903 ADC Evaluation Board for 16-Bit MCUs User’s Guide
1.2.1Using the Crystal X2
The MCP3903 ADC Evaluation Board for 16-Bit MCUs is populated with a 3.58 MHz
crystal, being used as a clock source, by placing jumpers in the following position on
the MCP3903 Digital I/O header block:
The PIC® MCU can be used to generate the CLKIN (MCLK) signal for the MCP3903,
setting the ADC sample rate through the use of the output compare module OC1. To
use this, make the following jumper change to the MCP3903 Digital I/O header block:
CLKOUT
CLKIN
CLKIN
FIGURE 1-4:ADC Clock Selection Jumpers - Clock from MCU.
The signal frequency from OC1 can be changed by the user from the PC software by
changing the value in the Sampling Speed Control box from the Edit menu. A low
number will generate a high frequency signal. The value of the sampling rate, which is
directly proportional to the clock frequency from OC1, is indicated in the sampling
speed indicator box in the PC software (see Figure 2-3) for the dsPIC33 example. In
the PIC24F example, the sampling speed is constant at 4.8 ksps, regardless of the
OSR value.
Two differential input paths allow external signal sources to be easily connected to the
MCP3903 input. Edge connectors JP1 and JP2 are 3-pin connectors that act both as
crew-type and clip-on post connectors.
Note: To use an edge connector as a post connector, pull up the blue plastic top
to access the posts.
JP1 and JP2 can be used to force either channel from a differential to a single-ended
configuration. R3 and R4 (on CH0), and R1 and R2 (on CH2) act as locations for
burden resistor connectors for any current transformer inputs.
1.4USB TO SERIAL CONVERTER
The MCP3903 ADC Evaluation Board for 16-Bit MCUs also contains a USB connection
for connecting the evaluation board to a PC. On the board, there is an MCP2200 USB
to UART converter that creates a virtual COM port on the PC. The MCP3903 ADC
Evaluation Board for 16-Bit MCUs also features a RS232 connector just in case it is
required. The RS232 Line driver is connected to the same UART pins of the MCU. For
this reason, a 3-pin jumper (J5) is present on the evaluation board to select which serial
communication will be used: USB or RS232. The following figure summarizes the
connections between the ADC, MCU, USB to serial converter and RS232 line driver.
If the user needs to evaluate the ADC on a system that uses dsPIC33 microcontrollers,
then a PIM connector with a dsPIC33FJ256GA710A can be used on the evaluation
board.
Using this example, the user can modify all MCP3903 internal registers from the PC
software “MCP390x Data VIEW”. The UART communication speed is at 115.2 kbps.
2.1.1SPI Communication
To transfer data from the ADC to the MCU, the SPI communication is controlled by
DMA1. DMA1 channel is set up to use nul data write to read the MCP3903 register
correctly. The DMA1 reads 7 bytes, but the first byte is not used. Before a new DMA
read takes place, the CS pin must be controlled in the software and the MCU must wait
for a new external interrupt 3 that indicates a new acquisition.
After the DMA1 transfer is finished, the DMA buffer content is moved into the Vch0 and
Vch1 buffers. The loop is repeated until Vch0 and Vch1 are filled.
Timer 8 and Timer 9 are configured to work as a 32-bit timer. This timer starts when the
acquisition is started and stopped when data buffers are full. The value indicated by this
timer will be used to evaluate the sampling speed of the ADC on the PC interface.
After the buffers are filled with the samples, the internal registers of MCP3903 are read
also using DMA1, now configured to read 16 bytes. The state of the MCP3903 internal
registers will be stored into the MCU, since later they will be sent to the PC GUI.
To set the MCP3903 configuration registers, MCU must write on the SPI bus. For this
purpose, the DMA0 channel is used and is set to do a thirteen bytes transfer from MCU
to MCP3903.
2.1.2UART Communication
To send the acquired samples from the MCU to the PC, the UART peripheral is used.
On the board, the user can use the RS232 DB9 connector to connect to a serial port
on PC side, or it can use the USB port that creates a virtual serial port on the PC, thanks
to the MCP2200 USB to TTL converter that is connected to the MCU.
The RX pins of the MAX2323 and the MCP2200 are tightened together with the TX pin
of the UART2 from the MCU. The user needs to select from jumperJ5 if the MCU
receives data from MCP2200 or MAX2323. In firmware, the MCU is using DMA2 to do
the transfer from MCU to the PC. To receive data from the PC through UART, the RX
interrupt is used.
MCP3903 ADC Evaluation Board for 16-Bit MCUs User’s Guide
Start
Initialization
Initialisation
G e t s a m ple s in to b u ffer [51 2 ]
Read Internal Registers
Wa it for P C G UI
command
Com mand
rec eiv ed
YES
C h e ck v alid ity
Command valid
YES
Write internal registers
Send samples from Buffer [512]
Send internal registers
Send FFT
(not computed here )
Update channels selection
NO
FIGURE 2-1:dsPIC33 Example Flow Chart.
2.1.3PC Software
NO
The PC receives the data and displays it on the MCP390x Data View. The program can
display and process only two channels at the same time. To select the desired
channels, the SW4 (RD13) must be pressed.
FIGURE 2-2:MCP3903 Data View Software - Main Screen.
Connectivity is done through the serial port. First, the user must identify the com port
number from My computer > Manage > Device Manager. After this, in “VISA resource
names”, users must find and select the correct com port number. Only after this, can
the START button be pressed to begin the data acquisition.
FIGURE 2-3:MCP3903 Data View Software - Registers and Settings Screen.
From the Edit menu, the user can open the Registers and Settings window to control
the internal registers of the MCP3903, the sampling speed of the ADC or if any
averaging should be done on the acquired samples.
From the buffer length, the user can select the amount of data that will be processed.
The maximum length is 512. From the Sampling Speed Control, the user can change
the sampling speed of the ADC. By writing a lower value, the sampling speed is
increased, and for higher values it is decreased. The accurate value of the sampling
speed is indicated in the Sampling speed indicator.
If the user wants to investigate the effect of averaging on the performance indicator, the
desired value can be written in the “Averages” control. It must be noted that the
processed buffer will decrease by a factor equal to the value of the average.
The Write Register and Read Register tabs are used to set the internal registers of
the MCP3903. With the Write Register tab they are written and with the Read Register tab, the user can check the settings of the registers.
MCP3903 ADC Evaluation Board for 16-Bit MCUs User’s Guide
The Waveform Graphs will show the signal in Time domain, while the Signal Spectrum
graphs shows the signal in Frequency domain. From the Graphs menu, under the
Signal Spectrum option, the user can find the Switch Y-axis scale option. From here,
it is possible to change the Y axis of the Signal Spectrum in linear scale or in logarithmic
scale. The spectrum signal information is obtained by performing a Fast Fourier
transformation over the Time domain signal. This Fourier transformation can be done
after the signal has been windowed. For this, the user must select the type of window
from the Window control on the lower area of the main window.
The Histogram Graph can be used to investigate the distribution of the codes. This is
especially helpful to check if a DC signal distribution is Gaussian. From the Graphs
menu, under the Histogram option, the user can Change the n umber of bits , with the
default being 40.
The indicators from the lower area of the program indicate other performance
parameters of the ADC. The main one is SINAD and related to it is Effective Number
of Bits (ENOB), used to indicate the AC signal performance. The ENOB value is
computed according to the formula below:
EQUATION 2-1:
ENOB
For DC signals, the Noise RMS signal in µV is displayed. For AC signals, the indicator
will show the RMS value of the signal.
PCB
1J1CONN POWERJACK MINI .08" R/A T/HSwitchcraft
1J2Mini USB Type B Surface MountSamtecMUSB-05-S-B-SM-A
1J3C ONN D-S UB RCP T R/A 9POS 15GO LD Tyco Electroni cs1734354-2
1J4"DO NOT INSTALL"