Microchip Technology Humidity Sensor PICtail, PIC16F690DM-PCTLHS User Manual

Humidity Sensor
PICtail™ Demo Board
User’s Guide
© 2005 Microchip Technology Inc. DS51594A
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 WAR­RANTIES 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’s products as critical components in life support systems is not authorized except with express written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron, dsPIC, K
EELOQ, microID, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE, PowerSmart, rfPIC, and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartSensor 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, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Linear Active Thermistor, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, Real ICE, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, 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.
© 2005, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received ISO/TS-16949:2002 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona and Mountain View, California in October 2003. The Company’s quality system processes and procedures are for its PICmicro 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.
®
8-bit MCUs, KEELOQ
®
code hopping
DS51594A-page ii © 2005 Microchip Technology Inc.
HUMIDITY SENSOR PICTAIL™
DEMO BOARD USER’S GUIDE
Table of Contents
Preface ........................................................................................................................... 1
Introduction............................................................................................................ 1
Document Layout .................................................................................................. 1
Conventions Used in this Guide ............................................................................ 2
Recommended Reading........................................................................................ 3
The Microchip Web Site ........................................................................................ 4
Customer Support ................................................................................................. 4
Document Revision History ................................................................................... 4
Chapter 1. Product Overview
1.1 Introduction ..................................................................................................... 5
1.2 Kit Contents .................................................................................................... 5
1.3 Humidity Sensor PICtail™ Demo Board ......................................................... 5
1.4 Associated Tools ............................................................................................ 7
1.5 Assembly Code Modules ................................................................................ 8
Chapter 2. Setup and Installation
2.1 Introduction ..................................................................................................... 9
2.2 Required Tools ............................................................................................... 9
2.3 Setting up the Humidity Sensor PICtail™ Demo Board ................................. 9
2.4 Connecting to Alternate Tools ...................................................................... 11
Chapter 3. Operation
3.1 Introduction ................................................................................................... 13
3.2 Configuring the Humidity Sensor PICtail™ Demo Board ............................. 13
3.3 Using the Humidity Sensor PC Program ...................................................... 13
3.4 Humidity Sensor Calibration ......................................................................... 15
Chapter 4. Modified Circuit
4.1 Introduction ................................................................................................... 17
4.2 The “Reduced Current” Circuit ..................................................................... 17
© 2005 Microchip Technology Inc. DS51594A-page iii
Humidity Sensor PICtail™ Demo Board User’s Guide
Appendix A. Schematic and Layouts
A.1 Introduction .................................................................................................. 19
A.2 Highlights ..................................................................................................... 19
A.3 Demonstration Board Description ................................................................ 19
A.4 The “Reduced Current” Modification ............................................................ 20
A.5 Additional Comments ................................................................................... 20
Appendix B. Bill Of Materials (BOM)
B.1 Humidity Sensor PICtail™ Demo Board BOM ............................................. 25
B.2 BOM for Humidity Sensor and Other Capacitors in Box .............................. 26
B.3 BOM for “Reduced Current” Modifications ................................................... 26
Worldwide Sales and Service .....................................................................................28
DS51594A-page iv © 2005 Microchip Technology Inc.
HUMIDITY SENSOR PICTAIL™
DEMO 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.
INTRODUCTION
This chapter contains general information that will be useful to know before using the Humidity Sensor PICtail™ Demo Board. Items discussed in this chapter include:
• Document Layout
• Conventions Used in this Guide
• Recommended Reading
• The Microchip Web Site
• Customer Support
• Document Revision History
DOCUMENT LAYOUT
This document describes how to use the Humidity Sensor PICtail™ Demo Board as a development tool to emulate and debug firmware on a target board. The manual layout is as follows:
Chapter 1. “Product Overview” – This is an introduction to the Humidity Sensor
PICtail™ Demo Board. It covers the kit contents, associated tools and how they work together.
Chapter 2. “Setup and Installation” – Covers the initial set-up of the Humidity
Sensor PICtail™ Demo Board. It lists the required tools, shows how to connect this board and demonstates how to verify the set-up.
Chapter 3. “Operation” – This chapter discusses using the humidity sensor on
the PCB and using the software PC Application.
• Chapter 4. “Modified Circuit” – Gives the modifications necessary to increase
measurement resolution by a factor of 100 (see AN1016 for details)
Appendix A. “Schematic and Layouts” – Gives detailed information on the
Humidity Sensor PICtail™ Demo Board. Includes detailed circuit explanation, schematic and board layouts.
Appendix B. “Bill Of Materials (BOM)” – Gives detailed information on the
Humidity Sensor PICtail™ Demo Board’s firmware.
© 2005 Microchip Technology Inc. DS51594A-page 1
Humidity Sensor PICtail™ Demo Board User’s Guide
CONVENTIONS USED IN THIS GUIDE
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters 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 brackets < > 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 repeated text var_name [,
A menu path File>Save
A tab Click the Power tab
where N is the total number of digits, R is the radix 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 mutually exclusive 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
DS51594A-page 2 © 2005 Microchip Technology Inc.
RECOMMENDED READING
This user's guide describes how to use Humidity Sensor PICtail™ Demo Board. Other useful documents are listed below and are recommended as supplemental reference resources.
PICkit™ 2 Microcontroller Programmer User’s Guide (DS51553)
Contains instructions on how to use the PICkit 2 Microcontroller Programmer hardware and software.
PICkit™ 1 Flash Starter Kit User’s Guide (DS40051)
Contains instructions on how to use the PICkit 1 Flash Starter Kit hardware and software.
MPLAB
This user’s guide covers Microchip’s low cost, real-time debugger and programmer for selected PICmicro (DSCs).
AN1016, “Detecting Small Capacitive Sensors Using the MCP6291 and PIC16F690 Devices” (DS01016)
Explains the functionality and design of this board’s circuit. Contains measurement results.
MCP6291/2/3/4/5 Data Sheet (DS21812)
Gives detailed information on the MCP6291/2/3/4/5 Op Amps.
PIC16F685/687/689/690 Data Sheet (DS41262)
Gives detailed information on the microcontroller used on the Humidity Sensor PICtail™ Demo Board.
PIC16C745/765 Data Sheet (DS41124)
Gives detailed information on the PICmicro microcontroller used on the PICkit 1 Flash Starter Kit.
®
ICD 2 In-Circuit Debugger User’s Guide (DS51331)
Preface
®
Microcontrollers (MCUs) and dsPIC® Digital Signal Controllers
The following document is available on the internet from the company listed, and is recommended as a supplemental reference resource.
Humirel, “Relative Humidity Sensor HS1100LF / HS1101LF,” Data Sheet, Rev. C, Sept. 2004.
Gives detailed information on Humirel’s (www.humirel.com) HS1101LF capacitive relative humidity sensor.
© 2005 Microchip Technology Inc. DS51594A-page 3
Humidity Sensor PICtail™ Demo Board User’s Guide
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
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 (December 2005)
• Initial Release of this Document.
DS51594A-page 4 © 2005 Microchip Technology Inc.
Chapter 1. Product Overview
1.1 INTRODUCTION
The Printed Circuit Board (PCB) discussed in this user’s guide is described as follows:
HUMIDITY SENSOR PICTAIL™
DEMO BOARD USER’S GUIDE
• Order Number:
• Assembly Number:
•Board Name: This board supports the capacitive humidity sensor application note AN1016. It
measures the capacitance of a relative humidity sensor (or capacitor) plugged into the board. The on-board microcontroller sends the measured and calculated data to a PC (Personal Computer) for display.
Items discussed in this chapter include:
• Kit Contents
• Humidity Sensor PICtail™ Demo Board
• Associated Tools
• Initial Set-up
1.2 KIT CONTENTS
• Humidity Sensor PICtail™ Demo Board – This is an assembled and tested Printed Circuit Board (PCB).
• CD-ROM – Provided separately in the shipping box; it contains the files and literature mentioned in this user’s guide.
• Humidity Sensor (HS1101LF) – Provided separately in the shipping box.
• Bag of Capacitors – Provided separately in the shipping box. These capacitors are provided for the user’s convenience; they make it easy to try out this board’s functionality, and to verify its accuracy.
PIC16F690DM-PCTLHS 102-00084R1 Humidity Sensor PICtail™ Demo Board
1.3 HUMIDITY SENSOR PICTAIL™ DEMO BOARD
The circuit operation is detailed in AN1016, “Detecting Small Capacitive Sensors Using the MCP6291 and PIC16F690 Devices” (DS01016)
The Humidity Sensor PICtail™ Demo Board contains the circuitry represented in Figure 1-1. The ambient relative humidity changes the capacitance of the humidity sensor (HS1101LF from Humirel). This sensor is connected to a MCP6291 op amp and a resistor to form an inverting (Miller) integrator. The PIC16F690 microcontroller sends a square wave to the input of the integrator, which the integrator converts to a triangle wave at its output. The firmware controls the magnitude of the triangle wave and measures the integration time. The microcontroller measures the time it takes for the triangle wave to rise and fall. These times are converted to a capacitance value.
A 14-pin header is provided for connecting to the PICkit™ 1 Flash Starter Kit, which acts like a docking station. It includes a two-wire serial bus that transfers the data, and two more wires for board power (+5V and GND inputs). This interface also supports programming of the on-board PIC16F690.
© 2005 Microchip Technology Inc. DS51594A-page 5
Humidity Sensor PICtail™ Demo Board User’s Guide
The +5V single supply voltage from the PICkit™ 1 Flash Starter Kit board is bypassed with two bulk 1 μF capacitors near the header, and two local 0.1 μF capacitors (one for each Integrated Circuit (IC)).
A 6-pin header for ICSP™ (In-Circuit Serial Programming™) is available as an alternate interface for programming the on-board PIC16F690. This allows the user to modify the program that comes with the Humidity Sensor PICtail™ Demo Board (with the MPLAB ICD 2 or PICkit™ 2 microcontroller programmer).
Humidity Sensor
PICtail™ Demo Board
Ambient
Humidity
Humidity
Sensor
®
Tes t P oin ts
+5V
GND
Vsen
Vcm
Vint
Op Amp
MCP6291
N.C.
Microcontroller
PIC16F690
+5V
GND
10
2
6
to PICkit™ 1 Flash Starter Kit
ICSP™
FIGURE 1-1: Humidity Sensor PICtail™ Demo Board Block Diagram.
The test points make it easier to test key points in the circuit using common lab equipment. The test points are:
• GND – Is connected to ground plane, and is for any lab equipment
• +5V – Positive supply voltage (at board edge); it provides a means to power this board with a laboratory power supply (when not connected to the PICkit™ 1 Flash Starter Kit)
•V
INT – Integrator’s input (a square wave during measurements) CM – Op amp’s common mode voltage (at its inverting input)
•V
•V
SEN – Integrator’s output of the integrator (a triangle wave during
measurements)
More details on the circuit and on its design can be found in Appendix A. “Schematic and Layouts” and AN1016, “Detecting Small Capacitive Sensors Using the MCP6291 and PIC16F690 Devices” (DS01016).
DS51594A-page 6 © 2005 Microchip Technology Inc.
Loading...
+ 22 hidden pages