Microchip Technology PIC18F87J72 User guide

PIC18F87J72
Evaluation Board
User’s Guide
© 2011 Microchip Technology Inc. DS51990A
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 the like is provided only for your convenience and may be superseded by updates. It is your 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 support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses 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, 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.
© 2011, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 978-1-61341-304-3
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
DS51990A-page 2 © 2011 Microchip Technology Inc.
PIC18F87J72 EVALUATION BOARD
USER’S GUIDE

Table of Contents

Preface ........................................................................................................................... 5
Introduction............................................................................................................ 5
Document Layout .................................................................................................. 6
Recommended Reading........................................................................................ 7
The Microchip Web Site ........................................................................................ 7
Customer Support ................................................................................................. 8
Document Revision History ................................................................................... 8
Chapter 1. Product Overview
1.1 Introduction ..................................................................................................... 9
1.2 PIC18F87J72 Evaluation Board Functionality and Features .......................... 9
1.3 PIC18F87J72 EVALUATION BOARD KIT CONTENTS .............................. 10
Chapter 2. Hardware Description
2.1 Introduction ................................................................................................... 11
Chapter 3. PIC18F87J72 Evaluation Board Features
3.1 Introduction ................................................................................................... 17
Chapter 4. PIC18F87J72 Evaluation Board Firmware Flowchart
4.1 Introduction ................................................................................................... 23
Chapter 5. PIC18F87J72 Evaluation Board Lab Test Results
5.1 Introduction ................................................................................................... 31
Chapter 6. PIC18F87J72 Evaluation Board GUI
6.1 Introduction ................................................................................................... 35
© 2011 Microchip Technology Inc. DS51990A-page 3
PIC18F87J72 EVALUATION BOARD USER’S GUIDE
Appendix A. Schematics and Layouts
A.1 Introduction .................................................................................................. 37
A.2 Board – Schematic 1 .................................................................................... 38
A.3 Board – Schematic 2 ................................................................................... 39
A.4 Board – Schematic 3 .................................................................................... 40
A.5 Board – Schematic 4 .................................................................................... 41
A.6 Board – PCB Front Page ............................................................................. 42
A.7 Board – PCB Top Silk ................................................................................. 43
A.8 Board – PCB Top Layer ............................................................................... 44
A.9 Board – PCB Bottom Layer .......................................................................... 45
A.10 Board – PCB Bottom Silk ........................................................................... 46
A.11 Board – PCB L1 Ground ............................................................................ 47
A.12 Board – PCB L2 VDD ................................................................................ 48
Appendix B. Bill of Materials (BOM)
Worldwide Sales and Service .....................................................................................52
DS51990A-page 4 © 2011 Microchip Technology Inc.
PIC18F87J72 EVALUATION BOARD
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 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 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 the general information that will be useful to know before using the PIC18F87J72 Evaluation Board. Items discussed in this chapter include:
• Document Layout
• Recommended Reading
• The Microchip Web Site
• Customer Support
• Document Revision History
© 2011 Microchip Technology Inc. DS51990A-page 5
PIC18F87J72 Evaluation Board User’s Guide
DOCUMENT LAYOUT
This document describes how to use the PIC18F87J72 Evaluation Board as a development tool to emulate and debug firmware on a target board. The manual layout is as follows:
Chapter 1. “Product Overview” – Provides a brief overview of the PIC18F87J72
Evaluation Board, its features and uses.
Chapter 2. “Hardware Description” – Provides a detailed description of the
PIC18F87J72 Evaluation Board hardware features.
Chapter 3. “PIC18F87J72 Evaluation Board Features” – Provides details on
how to use and configure the PIC18F87J72 Evaluation Board.
Chapter 4. “PIC18F87J72 Evaluation Board Firmware Flowchart” – Provides
the flow charts for various functions and routines in the firmware.
Chapter 5. “PIC18F87J72 Evaluation Board Lab Test Results” – Provides the
various lab test results obtained when working on a debugging environment using MPLAB
Chapter 6. “PIC18F87J72 Evaluation Board GUI” – Provides details on the
Graphical User Interface (GUI) used for plotting the various signals in time and frequency domain for spectral analysis.
Appendix A. “Schematics and Layouts” – Provides schematic and board
layouts of the PIC18F87J72 Evaluation Board.
Appendix B. “Bill of Materials (BOM)” – Provides details of all the components
with part numbers and designators used for the PIC18F87J72 Evaluation Board.
®
IDE.
DS51990A-page 6 © 2011 Microchip Technology Inc.
RECOMMENDED READING
This user's guide describes how to use PIC18F87J72 Evaluation Board. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources.
MPLAB
Refer to this document for more information on installation and implementation of the MPLAB Integrated Development Environment (IDE) software.
®
IDE Simulator, Editor User's Guide (DS51025)
THE MICROCHIP WEB SITE
Microchip provides online support through 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
© 2011 Microchip Technology Inc. DS51990A-page 7
PIC18F87J72 Evaluation Board User’s Guide
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
• Development Systems Information Line
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 (June 2011)
This is the initial release of this document.
DS51990A-page 8 © 2011 Microchip Technology Inc.
PIC18F87J72 EVALUATION BOARD
USER’S GUIDE

Chapter 1. Product Overview

1.1 INTRODUCTION

This chapter provides an overview of the PIC18F87J72 Evaluation Board. This board is used as a development tool and as evaluation kit for PIC18F87J72 based applications.
Topics discussed in this chapter include:
• Development Kit Contents
• Evaluation Board Functionality and Features

1.2 PIC18F87J72 EVALUATION BOARD FUNCTIONALITY AND FEATURES

The PIC18F87J72 Evaluation Board provides a platform for developing and evaluating applications which are based on the PIC18F87J72 device. These applications can range from accurate measurement of low signals like an output signal of a load cell to processing of information for metering and other metrology applications like energy metering, heatmeter and so on.
The PIC18F87J72 microcontroller has an 8-bit core processor along with many advanced peripherals like 12-bit SAR-based ADC, two 24-bit delta sigma ADCs and Charge Time Measurement unit (CTMU) for temperature measurement or implementation of touch keys.
PIC18F87J72 also has built-in Real Time Clock and Calendar (RTCC) with calibration registers for time stamping the measured data, and a Liquid Crystal Display (LCD) driver for a display up to 132 pixels.
The PIC18F87J72 Evaluation Board has the following features to develop and test user applications:
• Easy connection for low and high voltage signals. Signals from variety of sensors can be connected to this board.
• Touch keys to select different parameters of the of the 24-bit Delta Sigma ADC, like Over Sampling Ratio (OSR), Resolution, and Channel gain.
• Direct LCD display, driven from the COM/SEG pins of PIC18F87J72
• Real Time Clock
• Temperature Measurement option with CTMU
The PIC18F87J72 Evaluation Board can be connected to the GUI, supplied along with the board, to analyze the synchronous sampling, 24-bit, delta sigma ADCs. The ADCs have 90 dB SINAD and -104dB THD (up to the 35th harmonic) for each channel, enabling highly accurate energy metering and other low signal level designs. With less than 10 mVRMS output noise and a programmable gain amplifier of up to 32 V/V, these 24-bit ADCs are capable of interfacing to a large variety of small signal sensors, as well as voltage and current sensors, including shunts, Current Transformers (CT), Rogowski coils, Hall Effect sensors and load cells.
© 2011 Microchip Technology Inc. DS51990A-page 9
PIC18F87J72 Evaluation Board User’s Guide

1.3 PIC18F87J72 EVALUATION BOARD KIT CONTENTS

This PIC18F87J72 Evaluation Board kit includes:
• PIC18F87J72 Evaluation Board
• Pre-Programmed PIC18F87J72 microcontroller on board
• MCP2200 device on board
•GUI
• LAB VIEW installation software for the GUI
- Visa 441 runtime
- LVRTE86std
• Mini Universal Serial Bus (USB) connecting cable
DS51990A-page 10 © 2011 Microchip Technology Inc.

Chapter 2. Hardware Description

2.1 INTRODUCTION

This chapter describes the various sections of the hardware present on the evaluation board. It also describes the different configurations possible for operating the evaluation board, depending upon the input voltage and current specifications. Figure 2-1 shows the overall layout of the PIC18F87J72 Evaluation Board where the different hardware sections are indicated by numbers. Table 2-1 lists the descriptions for each hardware component.
PIC18F87J72 EVALUATION BOARD
USER’S GUIDE
11
10
3
5
2
4
1
13
8
6
7
Legend:
9
1 PIC18F87J72 microcontroller 8 9V battery connector
2 Seven segment LCD 9 MCP2200 – USB to Universal Asynchronous receiver/transmitter (UART)
3 High voltage section with connectors 10 Mini B USB receptacle
4 RJ11 connector 11 9V power supply jack
5 Load Cell connector 12 32.768 kHz crystal
6PICtail
7 Touch sensitive keys
connector 13 10 MHz crystal
serial converter
12
FIGURE 2-1: Layout of the PIC18F87J72 Evaluation Board.
© 2011 Microchip Technology Inc. DS51990A-page 11
PIC18F87J72 Evaluation Board User’s Guide
TABLE 2-1: BOARD LAYOUT AND COMPONENTS
SI
NO
1 PIC18F87J72 microcontroller Main controller for all functions on the board
2 Seven segment LCD To display time and other configuration features like OSR,
3 High voltage section with connectors For connecting universal input voltage to the board (when not
4 RJ11 connector For debugging and programming purpose
5 Load Cell connector Optional provision to connect an external load cell output to the
6PICtail™ connector To connect to other application-specific daughter cards
7 Touch sensitive keys Touch sense switches for changing configuration of
8 9V battery connector To connect a 9V battery when powering the board through it
9 MCP2200 – USB to UART serial converter To communicate with the GUI
10 Mini B USB receptacle To connect the USB port of the computer to the evaluation
11 9V power supply jack 9V power supply to the board
12 32.768 kHz crystal Clock to the internal Real-Time Clock and Calendar (RTCC)
13 10 MHz crystal External Clock to the main controller
Section or Component Functionality
Gain, Bit Width
using 9V supply or battery)
ADC input channels
Sigma-Delta ADC
board

2.1.1 PIC18F87J72 Evaluation Board Jumper Settings

Table 2-2 shows the various jumpers available on the PIC18F87J72 Evaluation Board. By connecting the jumper pins appropriately, different configurations can be achieved on the board. Care must be taken regarding the voltage level before placing these jumpers. Further sections in this document describe what precautions need to be ensured while connecting these jumpers.
TABLE 2-2: JUMPERS ON THE EVALUATION BOARD
SI NO Device Description
1 JP1 Selection between high voltage and low voltage input on channel CH0
2 JP2 To ground Pin 1 of J4
3 JP3 Used for burden connections when CT output is connected to J4
4 JP4 To ground Pin 3 of J4
5 JP5 To ground Pin 1 of J5
6 JP6 Used for burden connections when CT output is connected to J5
7 JP7 To ground Pin 3 of J5
8 JP8 Selection between high voltage and low voltage input on channel CH1
DS51990A-page 12 © 2011 Microchip Technology Inc.
Hardware Description

2.1.2 Measurement of High Voltages

The circuit diagrams in the schematics section of Appendix A. “Schematics and Lay­outs”, provide details on the resistor values used for dividing the network of the input
voltage. Table 2-3 provides a quick reference to resistor values in the high voltage sec­tion.
TABLE 2-3: RESISTORS FOR HIGH VOLTAGE MEASUREMENT
Register Value (KΩ)
R23 and R30 330
R24 and R31 330
R25 and R32 120
R33 and R35 1
R37 and R39 1
When measuring a high voltage signal on the input terminals of channels CH0 and CH1, refer to Table 2-4 and Table 2-5. These tables provide the configuration of jump­ers, along with the amplitude of the voltage available at the various points. The high voltage can be in the universal range of input voltage ranging from 85-265 Volts (Vrms) at 50 Hz or 60 Hz.
rms
TABLE 2-4: JUMPER SETTINGS FOR HIGH VOLTAGE MEASUREMENT ON CH0
CH0 Jumper Position ADC
Voltage
(Vrms)
80 Short 1-2 Open Open Short 0.10230 0.14468 Internal Gain of 2 can be used
110 Short 1-2 Open Open Short 0.14066 0.19893
220 Short 1-2 Open Open Short 0.28133 0.39786
270 Short 1-2 Open Open Short 0.34527 0.48828
280 Short 1-2 Open Open Short 0.35806 0.50637 Max Differential ADC I/P is 0.5V
JP1 JP2 JP3 JP4
ADC I/P
(Vrms)
ADC I/P (Vpeak)
for better resolution
Remark
TABLE 2-5: JUMPER SETTINGS FOR HIGH VOLTAGE MEASUREMENT ON CH1
CH1 Jumper Position ADC
Volta ge
(Vrms)
80 Short 1-2 Open Open Short 0.10230 0.14468 Internal Gain of 2 can be used
110 Short 1-2 Open Open Short 0.14066 0.19893
220 Short 1-2 Open Open Short 0.28133 0.39786
270 Short 1-2 Open Open Short 0.34527 0.48828
280 Short 1-2 Open Open Short 0.35806 0.50637 Max Differential ADC I/P is 0.5V
Note 1: The precautions given need to be strictly adhered to, in order to avoid any damage to the evaluation
2: Input high voltage AC signal can be applied between pins 1 and 2 of the connector J4 or J5. 3: The resistors R26 and R27 should not be populated when pins 1 and 2 of J4 are connected to a high
4: The resistors R28 and R29 should not be populated when pins 1 and 2 of J5 are connected to a high
5: The resistors R26, R27, R28 and R29 can be used only when CT outputs are connected to the
JP8 JP5 JP6 JP7
board and prevent electric shock hazard.
voltage.
voltage.
connectors J4 and J5. In this case, these resistors act as a burden resistor to the CT secondary winding.
ADC I/P
(Vrms)
ADC I/P (Vpeak)
for better resolution
Remark
© 2011 Microchip Technology Inc. DS51990A-page 13
PIC18F87J72 Evaluation Board User’s Guide

2.1.3 Measurement of Low Voltages

The circuit diagrams in the schematics section of Appendix A. “Schematics and Lay­outs”, provide details on the resistor values used for the low voltage circuit. Table 2-6
provides a quick reference to resistor values in the low voltage section.
TABLE 2-6: RESISTORS FOR LOW VOLTAGE MEASUREMENT
Register Value (KΩ)
R34 and R36 1
R33 and R35 1
R37 and R39 1
R38 and R40 1
When measuring a low voltage signal on the input terminals of channels CH0 and CH1, refer to Table 2-7 and Table 2-8. These tables provide the configuration of jumpers, along with the amplitude of the voltage available at the various points. The low voltage signal can be either an AC signal, a DC signal or a signal of any arbitrary wave shape.
TABLE 2-7: JUMPER SETTINGS FOR LOW VOLTAGE MEASUREMENT ON CH0
CH0 Jumper Position ADC
Voltage
(Vrms)
0.1 Short 2-3 Open Open Short 0.05000 0.05000 Internal Gain of 2 can be used for
0.2 Short 2-3 Open Open Short 0.10000 0.10000
0.5 Short 2-3 Open Open Short 0.25000 0.25000
1 Short 2-3 Open Open Short 0.50000 0.50000
1.1 Short 2-3 Open Open Short 0.55000 0.55000 Max Differential ADC I/P is 0.5V
JP1 JP2 JP3 JP4
ADC I/P
(Vrms)
ADC I/P (Vpeak)
better resolution
Remark
TABLE 2-8: JUMPER SETTINGS FOR LOW VOLTAGE MEASUREMENT ON CH1
CH1 Jumper Position ADC
Volta ge
(Vrms)
0.1 Short 2-3 Open Open Short 0.05000 0.05000 Internal Gain of 2 can be used for
0.2 Short 2-3 Open Open Short 0.10000 0.10000
0.5 Short 2-3 Open Open Short 0.25000 0.25000
1 Short 2-3 Open Open Short 0.50000 0.50000
1.1 Short 2-3 Open Open Short 0.55000 0.55000 Max Differential ADC I/P is 0.5V
Note 1: Input low voltage signal can be applied between pins 1 and 2 of the connector J4 or J5.
JP8 JP5 JP6 JP7
ADC I/P
(Vrms)
ADC I/P (Vpeak)
better resolution
Remark
DS51990A-page 14 © 2011 Microchip Technology Inc.
Hardware Description

2.1.4 Measurement of Current Signals

The circuit diagrams in the schematics section of Appendix A. “Schematics and Layouts”, provide details on the resistor values used for the current measurement
circuit. Table 2-9 provides a quick reference to resistor values while measuring the current signals. The output of Current Transformers (CTs) can be connected to the input connector pins.
TABLE 2-9: RESISTORS FOR LOW VOLTAGE MEASUREMENT
Register Value (KΩ)
R26 and R28 0.063
R27 and R29 0.063
R34 and R36 1
R33 and R35 1
R37 and R39 1
R38 and R40 1
When measuring a current signal on the input terminals of channels CH0 and CH1, refer to Table 2-10 and Table 2-11. These tables provide the configuration of jumpers, along with the amplitude of the voltage available at the various points.
TABLE 2-10: JUMPER SETTINGS FOR CURRENT MEASUREMENT ON CH0
CH0 Jumper Position ADC
CT Primary
Current
(Irms-A)
0.1 Short 2-3 Open Short Open 0.00063 0.00089 Internal Gain of 2 can be used for
0.5 Short 2-3 Open Short Open 0.00315 0.00445
1 Short 2-3 Open Short Open 0.0063 0.00891
10 Short 2-3 Open Short Open 0.063 0.08910
20 Short 2-3 Open Short Open 0.126 0.17819
30 Short 2-3 Open Short Open 0.189 0.26729 Max Differential ADC I/P is 0.5V
JP1 JP2 JP3 JP4
ADC I/P
(Vrms)
ADC I/P (Vpeak)
better resolution
Remark
© 2011 Microchip Technology Inc. DS51990A-page 15
PIC18F87J72 Evaluation Board User’s Guide
TABLE 2-11: JUMPER SETTINGS FOR CURRENT MEASUREMENT ON CH1
CH1 Jumper Position ADC
CT Primary
Current (Irms-A)
0.1 Short 2-3 Open Short Open 0.00063 0.00089
0.5 Short 2-3 Open Short Open 0.00315 0.00445
1 Short 2-3 Open Short Open 0.0063 0.00891
10 Short 2-3 Open Short Open 0.063 0.08910
20 Short 2-3 Open Short Open 0.126 0.17819
30 Short 2-3 Open Short Open 0.189 0.26729
Note 1: The precautions given need to be strictly adhered to, in order to avoid any damage to the evaluation board
and prevent electric shock hazard.
2: I/P CT Secondary is connected between pins 1 and 3 of J4 and J5. 3: The resistors R26, R27, R28 and R29 need to be populated. These resistors act as burden resistors for
CT secondary.
4: The calculations given in
resistance of 31.5(Ω).
JP1 JP2 JP3 JP4
Ta bl e 2 - 10 and Table 2-11are true for a CT ratio of 1:2500 and a burden
ADC I/P
(Vrms)
ADC I/P (Vpeak)
Internal Gain of 2 can be used for better resolution
Max Differential ADC I/P is 0.5V
Remark
DS51990A-page 16 © 2011 Microchip Technology Inc.
Loading...
+ 36 hidden pages