MCP98243 Microchip Technology Inc., MCP98243 Datasheet - Page 27

no-image

MCP98243

Manufacturer Part Number
MCP98243
Description
Memory Module Temperature Sensor W/ Eeprom For Spd
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MCP98243-BE/MC
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP98243-BE/MC
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP98243-BE/ST
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP98243-BE/ST
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP98243T-BE/MC
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP98243T-BE/MCAB
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP98243T-BE/MCAB
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
MCP98243T-BE/MNY
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
MCP98243T-BE/MNY
0
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
munication flow, also see
FIGURE 5-6:
© 2009 Microchip Technology Inc.
Equation
4
i2c_start();
i2c_write(ControlByte & 0xFE);
i2c_write(0x05);
i2c_start();
i2c_write(ControlByte | 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
T
) and the lower byte must be Left-shifted
A
This example routine assumes the variables and i2c communication subroutines are predefined:
bits to Temperature Conversion
UpperByte = UpperByte & 0x0F;
Temperature = 256 - (UpperByte x 16 + LowerByte / 16);
Temperature = (UpperByte x 16 + LowerByte / 16);
A
bits to decimal temperature, the
5-1.
Example Instruction Code.
Figure 5-7
-4
). Adding the results of the
Figure 5-6
for timing diagram.
shows the com-
Equation 5-1
// 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
//T
//Temperature = Ambient Temperature (°C)
//Clear SIGN
A
A
A
A
A
≥ T
> T
< T
< 0°C
≥ 0°C
EQUATION 5-1:
CRIT
UPPER
LOWER
Where:
A
Temperature ≥ 0°C
Temperature < 0°C
Register Address
UpperByte = T
LowerByte = T
T
A
T
=
A
256
=
T
(
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
+
4
LowerByte 2
+
LowerByte 2
DS22153A-page 27
×
×
4 –
)
4 –
)

Related parts for MCP98243