MCP9800DM-DL2 Microchip Technology, MCP9800DM-DL2 Datasheet - Page 15

BOARD DEMO 2 FOR MCP9800

MCP9800DM-DL2

Manufacturer Part Number
MCP9800DM-DL2
Description
BOARD DEMO 2 FOR MCP9800
Manufacturer
Microchip Technology

Specifications of MCP9800DM-DL2

Sensor Type
Temperature
Sensing Range
-55°C ~ 125°C
Interface
I²C, SMBus
Sensitivity
±0.5°C
Voltage - Supply
2.7 V ~ 5.5 V
Embedded
Yes, MCU, 8-Bit
Utilized Ic / Part
MCP9800
Processor To Be Evaluated
MCP9800, MCP101, PIC10F202, 24LC16B
Interface Type
I2C
Lead Free Status / RoHS Status
Not applicable / Not applicable
2.4
2.5
© 2007 Microchip Technology Inc.
FUNCTIONAL DESCRIPTION
I
2
C™ SUBROUTINES
2.4.1
This demo board was originally developed for the use in a class to teach people the
basics of the I
read and modify should one need to. Table 1-1 and Table 1-2 show some of the basic
subroutines and constant definitions used in the code. The TIMEOUTVAL variable may
be modified to put longer delays between measurements. Any value between 1
(default) and 255 may be used to vary the sample rate. The higher the number, the
slower the sample rate. The TIMEOUTVAL variable is approximately the number of sec-
onds delay between measurements.
The following subroutines provide low-level I
TABLE 1-1:
The following constants have been defined for communicating with the 24LC16B and
MCP9800:
TABLE 1-2:
Subroutine Descriptions
BSTART
BSTOP
SEND_ACK
SEND_NACK
BYTEOUT
BYTEIN
MEM_WRITE
MEM_READ
TEMP_WRITE
TEMP_READ
TEMP_REG
CONFIG_REG
SHUTDOWN
ONESHOT
BSTART
Description:
Arguments:
Output:
Return Value:
Code Example:
BSTOP
Description:
Arguments:
Constant
Subroutine
The MCP9800 Temperature Data Logger Demo Board 2
2
C™ protocol. The code is formatted in such a manner that it is easy to
I
CONSTANT DEFINITIONS
2
C™ SUBROUTINES
Generate an I
None.
None.
0
call
Generate an I
None.
b’10100000’
b’10100001’
b’10010000’
b’10010001’
0x00
0x01
b’00000001’
b’10000001’
BSTART
Value
Generate an I
Generate an I
Generate an I
Generate an I
Output an entire byte to the I
Input an entire byte from the I
2
2
C bus Start condition.
C bus Stop condition.
Installation and Operation
Control byte for EEPROM write operation
Control byte for EEPROM read operation
Control byte for temp. sensor write operation
Control byte for temp. sensor read operation
Temperature register address for temp. sensor
Configuration register address for temp. sensor
Configuration value for Shutdown mode
Configuration value for One-Shot mode
2
2
2
2
C™ bus Start condition.
C™ bus Stop condition.
C™ bus Acknowledge condition.
C™ bus Not Acknowledge condition.
; Generate Start
2
C support:
Description
2
2
C™ bus.
C™ bus.
Description
DS22027A-page 11

Related parts for MCP9800DM-DL2