Technical information
SCI to SPI Peripheral Communication in V850ES Microcontrollers
upper seven bits (D14 to D8) indicating degrees, and the lower four bits (D7 to D4) indicating sixteenths
of a degree.
The device can be programmed using the configuration register for different accuracies, from 8-bit
resolution (to the nearest degree) to 12-bit resolution (to the nearest 1/16
th
of a degree). Lower accuracies
provide faster conversion times between readings.
The 16-bit signed value can be taken as (temperature in degrees Centigrade) × 256. Examples of the
binary, hexadecimal, and degree representations of the temperature data are shown in Table 5. Note that
the data is different from that of the MAX6627. The reading of fractional degrees assumes 12-bit
resolution.
Table 5. Examples of Binary, Hexadecimal, and Degree Representations of Temperature Data
Binary Temperature Data Hexadecimal Temperature Data Temperature (ºC)
0111 1000 0000 0000 7800H 120
0110 0100 0000 0000 6400H 100
0011 0111 0000 0000 3700H 55
0001 0100 0000 0000 1400H 20
0000 0001 0000 0000 0100H 1
0000 0000 0001 0000 0010H 0.0625 (1/16)
0000 0000 0000 0000 0000H 0
1111 1111 1111 0000 FFF0H –0.0625 (–1/16)
1111 1111 0000 0000 FF00H –1
1110 1100 0000 0000 EC00H –20
1100 1001 0000 0000 C900H –55
In this format, the maximum positive temperature value would be 7FF0H (0111 1111 1111 0000 binary),
equivalent to +127.9375ºC. The maximum negative temperature value would be 8000H (1000 0000 0000
0000 binary), equivalent to –128ºC. The device itself is specified to operate from –55 to +120ºC and
would not be able to operate at these extremes.
2.5 Program Description and Specification
The program reads temperature data from two different SPI peripheral temperature sensor devices, a
MAX6627 and a DS1722, and displays the current temperature on the two-digit, seven-segment LED.
Pressing SW2 reads and displays the temperature from the MAX6627; pressing SW3 reads and displays
the temperature from the DS1722.
13