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’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.
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.
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
MCP9800 Temperature Data Logger 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 MCP9800 Temperature Data Logger Demo
Board. The manual layout is as follows:
• Chapter 1. “Product Overview” – Important information about the MCP9800
Temperature Data Logger Demo Board.
• Chapter 2. “Installation and Operation” – This chapter includes a detailed
description of each function of the demo board and instructions for how to begin
using the board.
• Appendix A. “Schematic and Layouts” – Shows the schematic and layout
diagrams for the MCP9800 Temperature Data Logger Demo Board.
• Appendix B. “Bill Of Materials (BOM)” – Lists the parts used to build the
This user's guide describes how to use MCP9800 Temperature Data Logger Demo
Board. The following Microchip documents are available and recommended as supplemental reference resources.
MCP9800/1/2/3 Data Sheet, “2-Wire High-Accuracy Temperature Sensor”
(DS21909)
This data sheet provides detailed information regarding the MCP9800 device.
AN1001 Application Note, “IC Temperature Sensor Accuracy Compensation with
a PICmicro
This application note provides detailed information regarding how to compensate the
MCP9800 output for higher accuracy.
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
This chapter provides an overview of the MCP9800 Temperature Data Logger Demo
Board and covers the following topics:
• What is the MCP9800 Temperature Data Logger Demo Board?
• What the MCP9800 Temperature Data Logger Demo Board Kit Includes
1.2WHAT IS THE MCP9800 TEMPERATURE DATA LOGGER DEMO BOARD?
The MCP9800 Temperature Data Logger Demo Board demonstrates how to use the
MCP9800 and an on-board EEPROM to log temperature data. A PIC16F684 14-pin
Flash-based 8-bit CMOS PICmicro
sensor and stores the temperature data in the EEPROM. The PICmicro microcontroller
also communicates with the the Personal Computer (PC) using the PICkit1™ Flash
Starter Kit. The temperature data stored in the EEPROM can be transferred to a PC
using the PICkit 1 software and saved in *.csv format. The data file can be opened
using Microsoft
The MCP9800 Temperature Data Logger Demo Board can also be used as a
“stand-alone” module, powered with a lithium battery, to measure ambient temperature
and store up to 4096 temperature samples over an extended period of time.
®
Excel® software.
®
microcontroller (MCU) device is used with the
1.3WHAT THE MCP9800 TEMPERATURE DATA LOGGER DEMO BOARD KIT
INCLUDES
This MCP9800 Temperature Data Logger Demo Board Kit includes:
• The MCP9800 Temperature Data Logger Demo Board
• PIC16F684 Firmware
• “MCP9800 Temperature Data Logger Demo Board User’s Guide”, (DS51593)
• MCP9800/1/2/3 Data Sheet, “2-Wire High-Accuracy Temperature Sensor“,
(DS21909)
• 24XX1025 Data Sheet, “1024K I
• PIC16F684 Data Sheet, “14-Pin Flash-Based, 8-Bit CMOS Microcontrollers with
The MCP9800 Temperature Data Logger Demo board allows the user to store up to
4096 temperature readings from the MCP9800 sensor to the 24LC1025, Microchip’s
1024 Kbit EEPROM. The PIC16F684 PICmicro microcontroller is used to communicate
with the sensor and EEPROM. In addition, the PICmicro microcontroller interfaces to a
PC using the PICkit™ 1 Flash Starter Kit and transfers the temperature readings from
the EEPROM to the PC. The data can be viewed using Microsoft Excel software. The
PICkit™ 1 Flash Starter Kit can also be used to reprogram the on-board PICmicro
microcontroller. The user can specify the number of measurements and measurement
duration. The MCP9800 Temperature Data Logger Demo board can be powered using
an external supply, the PICkit™ 1 Flash Starter Kit, or a 24 mm Lithium cell. The battery
allows stand-alone operations.
2.2FEATURES
The MCP9800 Temperature Data Logger Demo board has the following features:
• The MCP9800 Sensor with 0.25°C/LSb resolution
• Store 4096 temperature samples to serial EEPROM
• Standard 100 mil 14-pin header (P1) for easy interface to the PICkit™ 1 Flash
Starter Kit or custom application
• PIC16F6784 PICmicro Microcontroller
• Temperature Alert LED indicator and measurement progress LED Indicator
MCP9800 TEMPERATURE DATA
LOGGER USER’S GUIDE
2.3GETTING STARTED
This section describes how to quickly configure the MCP9800 Temperature Data Logger Demo board and PICkit™ 1 Flash Starter Kit. A simplified block diagram of the
configuration is provided in Figure 2-1.
PICkit™ 1 FLASH Starter Kit
MCU
ICSPDAT
ICSPCLK
®
J3
V
DD
GND
PICmicro
FLASH
USB
PC
FIGURE 2-1:MCP9800 Temperature Data Logger Demo Board Simplified Block Diagram.
1. Connect the P1 header of the MCP9800 Temperature Data Logger Demo board
to the J3 connector on the PICkit™ 1 Flash Starter Kit board. Refer to Figure 2-2
for proper orientation of the MCP9800 Temperature Data Logger Demo board
and Figure 2-3 for a simplified board schematic.
2. Connect the PICkit™ 1 Flash Starter Kit USB cable from the USB port of the PC
to the USB port (J1) on the PICkit™ 1 Flash Starter Kit board. +5V power is supplied to the PICkit 1 Flash Starter Kit board via the USB cable. The green
POWER LED and the red BUSY LED will turn on, indicating that power is being
supplied to the board.
Expansion
Header (J3)
USB Cable
MCP9800 Temperature Data
Logger Demo board
EMOVE THIS!
R
Potentiometer RP1
Push Button Switch SW1
PICkit™ 1 FLASH Starter Kit
FIGURE 2-2:MCP9800 PICtail™ Daughter Board and PICkit™1 FLASH Starter Kit.
3. Download and install the PICkit™ 1 Flash Starter Kit software to your PC.
4. Copy the 00083R1.HEX file supplied on the CD that came with this kit to your
PC.
Note:The PIC16F684 firmware is factory programmed with 00083R1.HEX,
therefore, it is not necessary to program it out of the box.
5. When the PICkit™ 1 Flash Starter Kit is started, the main window will be
displayed on the PC as indicated in Figure 2-4.
FIGURE 2-4:PICkit™ 1 Flash Starter Kit GUI Window on the PC.
6. Toggle device power to off by unchecking the Device Power box under Board
Controls in the PICkit™ 1 Flash Starter Kit window (Figure 2-4). The BUSY LED
on the PICkit™ 1 Flash Starter Kit board will turn off when the device power is
turned off.
7. Click on the Erase button in the window to ensure that the PIC16F684 device has
been erased.
8. From the File pull down menu, select Import HEX. A file window will appear.
Select and Open 00083R1.HEX.
9. Click on the Write Device button in the PICkit™ 1 Flash Starter Kit window. The
PIC16F684 device will be written to with the MCP9800 00083R1.HEX firmware.
Once completed, the status bar at the bottom of the window will indicate Write Successful.
10. Toggle the device power on by checking the Device Power box under Board
Controls in the PICkit™ 1 Flash Starter Kit window. The BUSY LED on the
PICkit™ 1 Flash Starter Kit board will turn on when device power is turned on.
11. The PICmicro microcontroller starts measuring temperature and storing the data
in the EEPROM.
Note:The J2 connector can be used to program the PICmicro microcontroller
2.4.1The MCP9800 Temperature Data Logger Demo board
The MCP9800 Temperature Data Logger Demo board uses the PIC16F684 to
measure ambient temperature using the MCP9800 temperature sensor and store the
temperature data to the 24LC1025 serial EEPROM. The number of samples and the
sampling duration is specified by the user. Once the specified number of samples are
stored, the controller waits for a command from the PICkit™ 1 Flash Starter Kit signal
analysis tool to transmit the samples to the PC. The software tool can be used to save
the data in *.csv format, which allows the user to view the data using Microsoft Excel
software.
There are two LEDs on-board, D
turns on when the ambient temperature rises above the user specified limit and it
remains lit until the temperature falls below the user specified hysteresis limit. (see
Section 2.4.2.3). D
indicates that the PICmicro microcontroller is in the process of
2
sampling temperature. During this time, it turns on momentarily every time temperature
is sampled. Once all samples are acquired, D
The RESET switch, S1, is used to reset the PICmicro microcontroller. Clicking GO in
the signal analysis software also resets the PICmicro microcontroller.
There are three sources of power connections to the data logger. Power can be supplied by connecting the 14-pin header to the PICKit™ 1 Flash Starter Kit board. The
user can also connect a +5V supply using the on-board test points. In addition, this
board supports a 24 mm 3V Lithium cell for stand-alone operation. To use the battery,
the “Battery On” jumper JP1 will need to be connected.
In order to prevent power contention between the power supply and on-board battery,
a dual Schottky diode, U5, is used to limit the current path. The diode ensures normal
operation if the board is connected to a +5V supply, while the Battery On jumper is
connected. There is about a 100 mV (typical) drop across the Schottky diode. The output of the diode is referred to as V
The MCP9800 Temperature Data Logger Demo board also uses Microchip’s MCP101
supervisor to reset the controller if V
There are several user selectable features, all require changing the code and recompiling the firmware. Steps 8, 9 and 10 of 2.3.2 “Programming the PIC16F684” will
then have to be repeated to reprogram the PICmicro microcontroller.
The userVariables.inc file includes all variables.
2.4.2.1STAND-ALONE
The MCP9800 Temperature Data Logger Demo board can be powered with a lithium
cell and operate as a stand-alone temperature data logger. To enable this feature, set
the stand-alone variable in the userVariable.inc file to “1”, compile the code and
program the PICmicro microcontroller. Set the variable to “0” to disable this feature.
In Stand-Alone mode, momentarily pressing the on-board reset push button switch will
overwrite previously stored data.
In order to retrieve the logged data, refer to Section 2.4.2.4.
2.4.2.2SETTING NUMBER OF SAMPLES AND SAMPLING TIME
The minimum number of samples that can be logged are 256 samples. The sample
size can be increased by multiples of 256 up to 4096 samples. The data logger board
can store up 128000 samples, however, currently the software tool does not support
data transfer size greater than 4096 samples.
The minimum measurement duration is 60 ms. The duration can be increased by a
multiple of 60 ms. Table 2-1 shows the user variable description as shown in the user-Variable.inc file.
Note 1: When downloading the data to the PC, select the corresponding sample size from
the pull down menu provided in the signal analysis software.
2.4.2.3SETTING TEMPERATURE ALERT LIMIT AND HYSTERESIS
The MCP9800 provides an open-drain temperature alert output. When the temperature
rises above the user specified limit, the output toggles and it remains set until the
temperature falls below the user specified hysteresis limit.
To set the limits, open the userVariables.inc file and select a decimal number that
corresponds to the temperature of interest to the defined variables,
MCP9800_Temperature.set and MCP9800_Temperature.hysteresis. For
example, if the temperature limit is 30°C and the hysteresis limit is 27°C, define ‘.30’
and ‘.27’ for the variables, respectively.
1. Connect the data logger to the PICkit™ 1 Flash Starter Kit J3 connector.
2. Select Acquisition mode as shown below and select the Oscilloscope display, as
shown in Figure 2-5.
3. Click GO to start acquisition. When the acquisition is complete, the data in the
EEPROM is transferred to the PC. In Stand-Alone mode, when clicking GO, the
acquisition is bypassed and the data in the EEPROM is transferred to the PC.
The Samples pull-down list provided in the signal analysis software defines the number
of temperature samples to be taken. In Stand-Alone mode, the samples need to match
the user specified sample size (Table 2-1). The Speed pull-down list does not change
the minimum temperature sampling speed of 60 ms.
FIGURE 2-5:Loading the Data from the On-board EEPROM to the PC.
The oscilloscope display shows the ambient temperature data from the MCP9800. This
display does not support negative numbers. Therefore, the data is offset by 1024. In
addition, the tool does not support 11-bit and 12-bit temperature data.
Note:The progress bar hangs for about 5-6 seconds for 256 temperature sam-
ples. This is due to timing differences between the PC and the PICmicro
microcontroller. The delay increases as the number of samples increase.
The GUI expects acquisition at 100 samples/sec, however, temperature is
acquired at 16 samples/sec.
2.4.2.5REAL-TIME DISPLAY ON PC
The stripchart tool available on the PICkit™ 1 Flash Starter kit software can be used to
display real time temperature data. This is done by selecting the strip chart tool on the
software and clicking GO.
FIGURE 2-6:Selecting the Strip Chart Tool for Real-time Temperature Display.
This display does not support negative numbers. Therefore, the data is offset by 1024.
In addition, the tool does not support 11-bit and 12-bit data.
The real-time display does not operator in the Stand-Alone mode.