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, 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: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.
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
DescriptionRepresentsExamples
Arial font:
Italic chara c tersReferenced booksMPLAB
Emphasized text...is the only compiler...
Initial capsA windowthe Output window
A dialogthe Settings dialog
A menu selectionselect Enable Programmer
QuotesA field name in a window or
dialog
Underlined, italic text with
right angle bracket
Bold charactersA dialog buttonClick OK
N‘RnnnnA number in verilog format,
Text in angle brac kets < >A key on the keyboardPress <Enter>, <F1>
Courier New font:
Plain Courier NewSample source code#define START
Italic Courier NewA variable argumentfile.o, where file can be
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:
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.1OVERVIEW
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.1Feature 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.2PIM 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”.
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.3MCP3901 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.1Using 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:
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 signal. 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.
1.4ANALOG INPUT STRUCTURE
SCK2/RG6
SDI2/RG7
SDO2/RG8
SS
2/RG9
USB
RD6/SCK2
RD4/SDO2
RD5/SDI2
PIC18F86J55
RD7/SS
2
ADC
MCP3901
RF6/SCK1
RF7/SDI1
RF8/SDO1
SCK
SDO
SDI
USB
SERIAL
512x8
SRAM
8
I
Two differential input paths allow external signal sources to be easily connected to the
MCP3901 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 posts.
JP1 and JP2 can be used to force either channel from a differential to 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.5UNIVERSAL SERIAL BUS (USB)
The MCP3901 ADC Evaluation Board for 16-Bit MCUs also contains a USB connection
for higher speed sampling and data collection. The circuit includes a 512x8 SRAM for
data collection. Figure 1-5 summarizes the connections between the ADC, the two
microcontrollers and memory.
Note:For the MCP3 901 AD C Evalua tion B oard f or 16-B it MCU s rele ase, no USB
firmware is supplied. The PIC18F86J55 is blank and only included for
development purposes.
Hardware Description
FIGURE 1-5:USB Block Diagram.
2010 Microchip Technology Inc.DS51845B-page 13
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
NOTES:
DS51845B-page 14 2010 Microchip Technology Inc.
MCP3901 ADC EVALUATION BOARD
FOR 16-BIT MCUs USER’S GUIDE
Chapter 2. Firmware
2.1DSPIC33 FIRMWARE DESCRIPTION
2.1.1Reset and Initialization
After reset, the global variables ConfigHValue, ConfigLVa lue, GainValue , and
StatusComValue are wr itten to 0x00. These variables will be written with values
received from the PC, to set up the MCP3901 as required. Next, the Initializ ation()
function is called to set up the dsPIC33. First, interrupt nesting is configured in order to
disable the user interrupts by putting the MCU priority at 7 (maximum). External interrupt
3 is enabled on the positive edge. The INT3 interrupt is enabled but the priority is set to 6.
Since it is lower than 7, it will not be active until the MCU priority is decreased to less than
6. The MCU uses the FRC (7.37 MHz) with PLL. The clock on the MCU will be 80 MHz,
the maximum frequency for dsPIC33, at which the computing power is 40 MIPS.
Timer2 is placed on the Output Compare 1 pin (OC1), and is used to generate the
master clock (MCLK) for the MCP3901. In addition, some initial values are set up for
the MCP3901 clock frequency. Timer5 is configured (but not active), and the interrupt
is disabled. The user can enable it for different applications. The SPI peripheral is
configured, but the interrupt is disabled. The SPI interrupt will be enabled in code to
establish the communication between MCU and MCP3901. The UART is used to send
and receive data from the PC at a speed of 115200 baud. Timer8 and Timer9 are
configured to create a 32-bit timer that runs at maximum speed. It is used to measure
the time needed to fill the data buffer, so it measures the sampling speed of the
MCP3901.
After the execution of the Initialization() function, the MCP3901 is configured
with values given by a set of functions especially developed for the MCP3901
configuration. In this case, this step is not necessary because the MCP3901 will update
its configuration using data from the PC GUI. These functions are helpful for users to
develop applications that do not involve a PC to configure the MCP3901.
For example, AddressLoop(NONE) is used to select the loop on specific registers
groups and types. DRHIZ(ON) will allow the data ready pulse to be present at the
output of the MCP3901 even if there is no pull-up resistor. SetGain(1,1) configures
the gain of both channels at 1. A list of all configuration functions are found in the
firmware file, main.c, starting at line 345.
It is important to have interrupts disabled during this configuration. Only after the
MCP3901 is configured using the functions described, can the interrupts be enabled.
In this case, it is done by decreasing the CPU priority to 3.
2010 Microchip Technology Inc.DS51845B-page 15
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
External Interrupt 3 Detected
Clear External Interrupt 3 Flag
Disable External Interrupt 3
Enable SPI1 Interrupt
Tight to GND CS to Select MCP3901
Turn ON Red LED
If CCT = 0
(If true, follows the reading of
the ADC results)
If CCT = 1
(If true, follows the reading of
the ADC configuration
registers)
NO
Send on SPI 0b00000001
(Read Address 0 – CH0 MSB)
Send on SPI 0b00001101
(Read Address 6 – ModOut)
YES
YES
Exit External Interrupt 3
2.2DATA ACQUISITION
The end of a conversion is indicated with a short high pulse on the Data Ready (DR)
pin of the ADC. The DR pin is connected to the External Interrupt 3 pin and is used for
detecting the end of a conversion on MCP3901. In the INT3 interrupt, the SPI interrupt
is activated and the first transmission on the SPI is initiated. The SPI communication
that follows can be a read of the ADC conversion register or the Configuration register.
CCT = 0 is a read of the ADC Conversion register, and CCT = 1 is a read of the
MCP3901 Configuration register. It is possible to read the ADC conversion registers
and MCP3901 configuration registers at the same time, but due to transfer volume and
its impact on speed, this will prevent achieving a high sampling rate. SPI communication is always in 8-bit mode.
FIGURE 2-1:INT3 Flowchart.
An SPI interrupt takes place after each successful data transfer between master and
slave on the SPI. As with any interrupt, the first thing to do is to clear the interrupt flag;
otherwise, a new interrupt will occur without reason. The CCSPI global value is the
counter that indicates if the SPI transfer that is occuring is the first, the second, etc.
After saving the samples into the MCU, SPI communication is disabled bysetting CS
high. If CCT was ‘0’, then the data that comes from the MCP3901 is ADC conversion
data and will be converted from 3 bytes into an unsigned long number. This 24-bit value
will be saved into the current or voltage buffers.
DS51845B-page 16 2010 Microchip Technology Inc.
Firmware
SPI1 Transfer Interrupt
Clear Flag;
Read SPI1BUF;
Read Address Loop Bits from
If Address Loop =
NONE?
Send 12 transfers on the SPI to read the content of the 6
registers that are holding the ADC result;
Compute the 24-bit value for each channel and save it in
voltage and current buffers;
At the first sample, read start timer 32-bit Timer8:9;
At the read of the last sample, read the Timer8:9 content
(for sampling speed measurement)
Send 6 transfers on the SPI to read the content of the 6
registers that are holding the ADC result;
Compute the 24-bit value for each channel and save it in
voltage and current buffers;
At the first sample read, start timer 32-bit Timer8:9;
At the read of the last sample, read the Timer8:9 content
(for sampling speed measurement)
YESNO
Read Modulator Output reg ister ;
Read Phase register;
Read Gain register;
Read Status register;
Read Configuration High register;
Read Configuration Low register
Read Modulator Output register;
Read Phase register;
Read Gain register;
Read Status register;
Read Configuration High register;
Read Configuration Low register
Disable SPI interrupt;
Enable UART TX interrupt;
Sent the char 0d33 on UART
Exit SPI Interrupt
Status Registr
When the first sample is written in the buffer, the 32-bit timer created using Timer8 and
9, begins counting from 0. When the last sample is written into the buffer, the 32-bit
timer is read. The value indicated will be used to compute the sampling speed.
If the CCT is 1, then the data read from the MCP3901 will be the configuration data.
This will be saved in MCU in other global variables, used later to send this info to the
PC GUI.
After the SPI communication completes, the SPI interrupt will be disabled and the
UART TX interrupt will be enabled. The first character sent on UART is char 33; this is
the header of the UART communication protocol that is adopted here.
FIGURE 2-2:SPI Routine Flowchart.
2010 Microchip Technology Inc.DS51845B-page 17
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
2.3UART COMMUNICATION PROTOCOL
The MCU uses the UART to send and receive data to the PC. The TX and RX interrupts
are not used simultaneously in this firmware example, but it is possible to do so, if the
user requires it.
As soon as the buffer is filled with data from the ADC, the SPI interrupt is disabled, and
the TX interrupt is enabled. There are more types of data to be sent from the MCU to
the PC. The first to be sent is the data stored in the buffers. Before being sent, each
number is translated to ASCII characters that represent the number stored in the buffer.
The start of the buffer data transmissions is acknowledged by transmitting the
character: “!”.
The numbers in the current buffer are comma delimited, and each row ends with the
characters “0x0D”. After 512 rows, the buffer data transmission is complete, which is
signaled by sending out the character “D”.
Next, the data regarding the MCP3901 configuration and sampling speed is sent out.
After a total of 35 characters are sent, the MCP3901 configuration data is fully transmitted, which is signaled by sending the character “;” to the PC. This character also
signals that the result of an FFT computation will be sent out next.
In the last UART TX interrupt, the TX interrupt is disabled and the RX interrupt is
enabled. Through the RX interrupt, the MCU will receive the configuration for the
MCP3901 desired by the user. The protocol is simple. The first character received must
be “D” from configuration data. Following this character will be the values of 6 registers:
PHASE, GAIN, CONFIGH, CONFIGL, STATUS, PPREG8. The first 5 registers can
hold values from 0 to 255, so they are made up of a maximum 3 characters. If the equivalent number is less than 100, the first character will be the space character (“ ”), not
zero. The PREG8 register is a 16-bit register inside the MCU that controls the frequency of the clock signal from OC1, which controls the sampling speed of the
MCP3901. Since it is a 16-bit register, the number of characters that create the correct
value is 5.
DS51845B-page 18 2010 Microchip Technology Inc.
Firmware
UART TX Interrupt
contrd<=512?
Get CH0 sample from current[contrd];
Change Long into 8 digit string;
write character “,” to val[8];
Get CH1 samples from voltage[contrd];
Change the value in 8 digit string;
Write char CR to val[17]
YES
contrd=513?
NO
YES
Send char “D”;
Increment contrd
NO
contrd2<=17?
Send val[contrd2];
Increment contrd2
contrd2=0;
Increment contrd
YES
NO
contrd=514?
Transform MODr from
byte in 3 chars;
Transform PHASEr
from byte in 3 chars;
Transform GAINr from
byte in 3 chars;
Transform STATUSr
form byte in 3 chars
Transform CONFIGHr
from byte in 3 chars;
Transform CONFIGLr
from byte in 3 chars;
Transform Timer8
from int in 5 chars;
Transform Timer9
form int in 5 chars
YES
Contrd2<=35?
Send one char to PC
Increment contrd2
YESContrd2=36?
NO
Reset contrd2;
Increment contrd
contrd=515?
NO
Sent to PC char “;”;
Increment contrd
YES
Contrd<=515+REAL_N?
Transform the FFT result of
the voltage channel from
5 chars;
Transform the FFT result of
the current channel from
5 chars;
(IN CURRENT FIRMWARE
FFT IS NOT COMPUTED)
Contrd2<=11?
Sent char to PC;
Increment contrd2
NO
YES
YES
Reset contrd2;
Increment contrd
NO
Contrd==515+
REAL_N+1?
NO
Disable UART TX interrupt;
Contrd=515+REAL_N+2;
Enable UART RX interrupt
YES
Exit UART TX Interrupt
NO
int to
int to
FIGURE 2-3:Serial Transmission Flowchart.
2010 Microchip Technology Inc.DS51845B-page 19
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
NOTES:
DS51845B-page 20 2010 Microchip Technology Inc.
MCP3901 ADC EVALUATION BOARD
Chapter 3. MCP3901 PC Software Tool
3.1SOFTWARE OVERVIEW
The MCP3901 ADC Evaluation Board for 16-Bit MCUs includes a PC Graphical User
Interface (GUI) that performs:
• ADC configuration
• Data analysis for easier system debugging
• Device evaluation
Figure 3-1 shows a sample of the software’s GUI.
FOR 16-BIT MCUs USER’S GUIDE
FIGURE 3-1:MCP3901 Data View Interface.
2010 Microchip Technology Inc.DS51845B-page 21
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
ENOB16log
2
–=
3.2SETTING THE CONFIGURATION OF THE ADC
The MCP3901 Data View sets up the configuration registers of the MCP3901 by putting
the desired value on the “Write Registers” tab. Usually, it takes a few seconds to update
the MCP3901 configuration. T o learn the configuration of the MCP3901 without changing it, click on the “Read Registers” tab and the same image as in “Write Registers” will
display. The difference is that the controls will be indicators, and the user cannot
change the values, but can only read the setup of the MCP3901.
3.3CONNECTIVITY AND RECORDING LENGTH
The PC is connected to the MCP3901 ADC Evaluation Board for 16-Bit MCUs through
the RS232 cable. It is important to have a COM port on the PC. It is also possible to
use a USB to RS232 adaptor cable, but the user will need to note the number of the
virtual COM port. To do this, right click on My computer > Manage > Device Manager > Port (COM and LPT), and read the number in parenthesis after the device name. The
COM port number must be selected in the “VISA Resource Name” field.
The MCU sends a large package of data to the PC. If the user only needs to see a small
part of the buffer, define the desired buffer length in the “Buffer Length” field. The
maximum length is 512 samples.
The average control can be used to view the impact of averaging over the ADC
accuracy. The number of points in the waveform graph will be less than the number
written in the “Buffer Length” control by a ratio equal with the value of the average. A
value equal to zero will cause an error. A value of ‘1’ means that no averaging is done.
When the program is opened for the first time, the value from the controls will have
some default values. The user must set up the communication port before starting the
acquisition by pressing the START button. To stop the acquisition, press the STOP button. Close the MCP3901 Data View application by clicking the “X” in the upper right
corner of the window.
3.4SCOPE PLOT WINDOW - TIME DOMAIN ANALYSIS
The recorded samples from a buffer are indicated on the “Waveform Graphs” screens.
The size of the X axis is given by the number written in the “Buffer Length” field. On the
Y axis, the LSBs are indicated. To scale the time axis, it is necessary to modify either
the buffer length (the number of points indicated in the waveform graph), or to change
the sampling rate of the ADC.
The sampling rate of the ADC can be changed from the “Sampling Speed Control” box.
Writing a small value will achieve a high sampling rate. The correct value of the sampling rate is indicated in the “Sampling Speed Indicator”. The highest sampling speed
that can be obtained is 55 ksps by setting: OSR = 32, Addr Loop = ALL and Sampling
Speed Control = 5.
3.5HISTOGRAM WINDOW – NOISE ANALYSIS
For the evaluation of the Effective Number Of Bits (ENOB), the GUI will compute a few
statistical parameters: the mean value, standard deviation, and variance for each channel. These parameters display at the bottom of the GUI, under the Histogram Graph
screens. The formula used for the ENOB in the case of a DC signal is seen in
Equation 3-1, if the application indicates the acquired data on 16 bits.
EQUATION 3-1:
DS51845B-page 22 2010 Microchip Technology Inc.
MCP3901 PC Software Tool
ENOB24log
2
–=
ENOB
SINAD1.76–
6.02
----------------------------------=
Use Equation 3-2 if the data is represented on 24 bits.
EQUATION 3-2:
ENOB can also be computed when an AC signal is applied at the input. The formula to
compute ENOB in an AC case is s hown in Equation 3-3.
EQUATION 3-3:
The distribution of noise from the acquired signal displays on the Histogram Graph
screens.These graphs indicate how many times a code was present inside a buffer.
3.6FFT WINDOW – FREQUENCY DOMAIN ANALYSIS
The spectrum of the acquired signal is visible in the Signal Spectrum screen. Above
these graphics there is a button that can be used to set the Y axis to be linear or
logarithmic. A logarithmic scale on the Y axis is useful to see the level of low harmonics,
or the noise floor. The length of the FFT is give n by the buffer length and the samplin g
speed. The X axis is scaled directly in Hz units.
Another feature of the software is the window selection for the FFT computation. This
is done from the “Window” fields, in the lower region of the GUI, right above the
Current FFT screens. The user can select from a large number of windows.
Since the GUI performs the spectral analysis of the acquired signal, it is possible to
compute AC performance parameters of the ADC: “THD” and “SINAD” are shown on
the indicators, under the Histog ram Graph scr een s.
2010 Microchip Technology Inc.DS51845B-page 23
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
NOTES:
DS51845B-page 24 2010 Microchip Technology Inc.
Appendix A. Schematics and Layouts
A.1INTRODUCTION
This appendix contains the following schematics and layouts of the MCP3901 ADC
Evaluation Board for 16-Bit MCUs.
• Schematic - Analog
• Schematic - LCD and UART
• Schematic - USB and Memory
• Schematic - Microcontroller (MCU)
• Schematic - PIM Module
•Schematic - Power
• Board - Top Trace and Top Silk
• Board - Bottom Trace and Bottom Silk
• Board - Layer #2 VDD
• Board - Layer #3 GND
• Board - Top Silk and Pads
• Board - Bottom Silk and Pads
MCP3901 ADC EVALUATION BOARD
FOR 16-BIT MCUs USER’S GUIDE
2010 Microchip Technology Inc.DS51845B-page 25
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
M
A.2SCHEMATIC – ANALOG
DS51845B-page 26 2010 Microchip Technology Inc.
A.3SCHEMATIC – LCD AND UART
M
Schematics and Layouts
2010 Microchip Technology Inc.DS51845B-page 27
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
M
A.4SCHEMATIC – USB AND MEMORY
DS51845B-page 28 2010 Microchip Technology Inc.
Schematics and Layouts
M
A.5SCHEMATIC – MICROCONTROLLER (MCU)
2010 Microchip Technology Inc.DS51845B-page 29
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
M
A.6SCHEMATIC – PIM MODULE
DS51845B-page 30 2010 Microchip Technology Inc.
A.7SCHEMATIC – POWER
M
Schematics and Layouts
2010 Microchip Technology Inc.DS51845B-page 31
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
MCP3901 ADC Eval Board for 16-bit MCU
A.8BOARD – TOP TRACE AND TOP SILK
A.9BOARD – BOTTOM TRACE AND BOTTOM SILK
DS51845B-page 32 2010 Microchip Technology Inc.
A.10BOARD – LAYER #2 VDD
Schematics and Layouts
A.11BOARD – LAYER #3 GND
2010 Microchip Technology Inc.DS51845B-page 33
MCP3901 ADC Evaluation Board for 16-Bit MCUs User’s Guide
The components listed in this Bill of Materials are representative of the PCB assembly. The
RES 4.70K OHM 1/10W 1% 0603
SMD
RES 1.00K OHM 1/10W 1% 0603
SMD
SMD
SMD
SMD
SMD
SMD
RES 100 OHM 1/10W 1% 0603
SMD
RES 100K OHM 1/10W 1% 0603
SMD
RES 1.0K OHM .1% 1/4W 0805
SMD
SMD
SWITCH TACT 6MM 230GF
H=4.3MM
released BOM used in manufacturing uses all RoHS-compliant components.
Coilcraft0805PS-103KLC
TianMaTM162JCAWG1
Keystone Electronics8723
Keystone Electronics8722
Keystone Electronics8724
SAMTECTSW-110-07-G-D
Microchip Technology
Inc.
RohmMCR03EZPFX4701
RohmMCR03EZPFX1001
RohmMCR03EZPFX1002
RohmMCR03EZPFX1301
RohmMCR03EZPJ000
RohmMCR03EZPFX2201
RohmMCR03EZPFX1004
RohmMCR03EZPFX1000
RohmMCR03EZPFX1003
Susumu Co LtdRGH2012-2E-P-102-B
RohmMCR10EZHF10R0
Omron Electronics
Inc-ECB Div
104-00221
B3S-1002P
DS51845B-page 36 2010 Microchip Technology Inc.
Bill Of Materials (BOM)
TABLE B-1:BILL OF MATERIALS (CONTINUED)
QtyReferenceDescriptionManufacturerPart Number
1TP1Wire Test Point 0.3" LengthComponent Corporation PJ-202-30
1U1IC REG LDO 800MA 5.0V SOT-223 N ational Se miconductor LM1117MP-5.0/NOPB
1U2IC PIC USB MCU FLASH 48KX16
The components listed in this Bill of Materials are representative of the PCB assembly. The
released BOM used in manufacturing uses all RoHS-compliant components.
MicrochipPIC18F86J55-I/PT
Semiconductor
Inc.
Solution Inc
Texas InstrumentsSN75C3223PW
Inc.
Abracon CorporationABLS-3.579545MHZ-B2-T
Abracon CorporationABLS-7.3728MHZ-B2-T
®
LM1117MP-3.3/NOPB
MCP3901-I/SS
IS61LV5128AL-10TLI
MCP130T-270I/TT
TABLE B-2:BILL OF MATERIALS — COMPONENTS NOT INSTALLED
QtyReferenceDescriptionManufacturerPart Number
J4DO NOT INSTALL
120-pin MINI EDGE CARD
SOCKET
1LCD1DO NOT INSTALL——
1P9DO NOT INSTALL——
13R1, R2, R3,
R4 R6, R8,
R9, R10, R17,
R18, R25
R29, R35
1U7DO NOT INSTALL——
Note 1:Th e compo nent s li sted i n this Bi ll of M ateria ls are repres ent ative of the PCB ass embly. The released BOM
used in manufacturing uses all RoHS-compliant components.
DO NOT INSTALL——
SAMTECMEC1-160-02-L-D-A
2010 Microchip Technology Inc.DS51845B-page 37
Worldwide Sales and Service
AMERICAS
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://support.microchip.com
Web Address:
www.microchip.com
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088