MCP98243-BE/MNY MICROCHIP [Microchip Technology], MCP98243-BE/MNY Datasheet - Page 27

no-image

MCP98243-BE/MNY

Manufacturer Part Number
MCP98243-BE/MNY
Description
Memory Module Temperature Sensor w/ EEPROM for SPD
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet
5.1.4.1
To convert the T
upper three boundary bits (bits 15, 14 and 13) must be
masked out. Then determine the sign bit (bit 12) to
check positive or negative temperature, shift the bits
accordingly and combine the upper and lower bytes of
the 16-bit register. The upper byte contains data for
temperatures greater than 32°C while the lower byte
contains data for temperature less than 32°C, including
fractional data. When combinding the upper and lower
bytes, the upper byte must be Right-shifted by 4bits (or
multiply by 2
by 4 bits (or multiply by 2
shifted values provides the temperature data in decimal
format, see
The temperature bits are in two’s compliment format,
therefore, postive temperature data and negative tem-
perature data are computed differently.
shows the temperature computation. The example
instruction code outlined in
communication flow, also see
diagram.
FIGURE 5-6:
© 2009 Microchip Technology Inc.
i2c_start();
i2c_write(AddressByte & 0xFE);
i2c_write(0x05);
i2c_start();
i2c_write(AddressByte | 0x01);
UpperByte = i2c_read(ACK);
LowerByte = i2c_read(NAK);
i2c_stop();
//Convert the temperature data
//First Check flag bits
if ((UpperByte & 0x80) == 0x80){
}
if ((UpperByte & 0x40) == 0x40){
}
if ((UpperByte & 0x20) == 0x20){
}
UpperByte = UpperByte & 0x1F;
if ((UpperByte & 0x10) == 0x10){
}else
Equation
4
T
) and the lower byte must be Left-shifted
A
This example routine assumes the variables and I
UpperByte = UpperByte & 0x0F;
Temperature = 256 - (UpperByte x 16 + LowerByte / 16);
Temperature = (UpperByte x 16 + LowerByte / 16);
bits to Temperature Conversion
A
bits to decimal temperature, the
5-1.
Example Instruction Code.
-4
). Adding the results of the
Figure 5-6
Figure 5-7
Equation 5-1
shows the
for timing
// send START command
//WRITE Command
//also, make sure bit 0 is cleared ‘0’
// Write T
//Repeat START
// READ Command
//also, make sure bit 0 is Set ‘1’
// READ 8 bits
//and Send ACK bit
// READ 8 bits
//and Send NAK bit
// send STOP command
//T
//T
//T
//T
//Clear flag bits
//Clear SIGN
//T
//Temperature = Ambient Temperature (°C)
A
A
A
A
A
≥ T
> T
< T
< 0°C
2
≥ 0°C
C communication subroutines are predefined:
CRIT
UPPER
LOWER
A
EQUATION 5-1:
Where:
Register Address
Temperature ≥ 0°C
Temperature < 0°C
UpperByte = T
LowerByte = T
T
T
A
A
=
=
T
(
256
A
UpperByte 2
= Ambient Temperature (°C)
(
UpperByte 2
A
A
TEMPERATURE
CONVERSION
bit 15 to bit 8
bit 7 to bit 0
BYTES TO
×
MCP98243
4
+
×
LowerByte 2
4
+
DS22153B-page 27
LowerByte 2
×
4 –
)
×
4 –
)

Related parts for MCP98243-BE/MNY