文档介绍:AN988
Interfacing the MCP9800 I2C™ Digital Temperature Sensor
to a PICmicro® Microcontroller
The MCP9800 digital temperature sensor is especially
Author: Ezana Haile and Jim Lepkowski 2
Microchip Technology Inc. suited for embedded systems due to its I C™ interface,
which serves to provide an industry standard method of
interface to a microcontroller. This application note will
INTRODUCTION discuss system integration, firmware implementation
and Printed Circuit Board (PCB) layout techniques for
The MCP9800 is a digital CMOS silicon temperature using the MCP9800 in an embedded system.
sensor that provides an accurate digital temperature
measurement. Data is converted from an internal The techniques for integrating the MCP9800 into an
diode temperature-sensing element to a digital format embedded systems environment will be demonstrated
that can be directly interfaced to a PICmicro® by using the PICkit™ 1 Flash Starter Kit and a
microcontroller unit (MCU). The MCP9800 sensor MCP9800 PICtail™ daughter board. The MCP9800
offers many system-level advantages, including the PICtail daughter board plugs into the PICkit 1 Flash
integration of the sensor and signal-conditioning Starter Kit expansion header J3, as shown in Figure 1.
circuitry in a small Integrated Circuit (IC) package. The The MCP9800 demonstration is designed to measure
MCP9800 also has a One-shot Conversion mode that and display temperature using the on-board 7-segment
performs a single temperature measurement and then LED display.
goes into power-saving Shutdown mode. The One- Gerber files for the PCB, source code and a hex file to
shot Conversion mode makes this sensor a good program a PIC16F684 are included in panion
choice for power-critical, portable applications. zip file, .
PICkit™ 1 Flash Starter Kit MCP9800 PICtail™ Demo Board
PICmicro®
Flash MCP9800 Alert Indicator
MCU Thermal
Sensor
J3 J2
2 2
USB I C™ I2C Interface
PC Interface
SPI™ 2