Atmel Xplained Pro Evaluation Kit for the ATSAMD21J18A Microcontroller ATSAMD21-XPRO ATSAMD21-XPRO Data Sheet
![Atmel](https://files.manualsbrain.com/attachments/0369829915bda09f9c2e00fb805a7753579683b5/common/fit/150/50/8d2bf08978ec3e5bc63f4343ac5e91ce8d0e40045619fa520d910d64af8f/brand_logo.png)
Product codes
ATSAMD21-XPRO
948
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181C–SAM-D21_Datasheet–07/2014
The temperature sensor values are logged during test production flow for Room and Hot insertions:
z
ROOM_TEMP_VAL_INT and ROOM_TEMP_VAL_DEC contains the measured temperature at room
insertion (e.g. for ROOM_TEMP_VAL_INT=25 and ROOM_TEMP_VAL_DEC=2, the measured
temperature at room insertion is 25.2°C).
insertion (e.g. for ROOM_TEMP_VAL_INT=25 and ROOM_TEMP_VAL_DEC=2, the measured
temperature at room insertion is 25.2°C).
z
HOT_TEMP_VAL_INT and HOT_TEMP_VAL_DEC contains the measured temperature at hot insertion
(e.g. for HOT_TEMP_VAL_INT=83 and HOT_TEMP_VAL_DEC=3, the measured temperature at room
insertion is 83.3°C).
(e.g. for HOT_TEMP_VAL_INT=83 and HOT_TEMP_VAL_DEC=3, the measured temperature at room
insertion is 83.3°C).
The temperature log row also contains the corresponding 12bit ADC conversions of both Room and Hot temperatures:
z
ROOM_ADC_VAL contains the 12bit ADC value corresponding to (ROOM_TEMP_VAL_INT,
ROOM_TEMP_VAL_DEC)
ROOM_TEMP_VAL_DEC)
z
HOT_ADC_VAL contains the 12bit ADC value corresponding to (HOT_TEMP_VAL_INT,
HOT_TEMP_VAL_DEC)
HOT_TEMP_VAL_DEC)
The temperature log row also contains the corresponding 1V internal reference of both Room and Hot temperatures:
z
ROOM_INT1V_VAL is the 2’s complement of the internal 1V reference value corresponding to
(ROOM_TEMP_VAL_INT, ROOM_TEMP_VAL_DEC)
(ROOM_TEMP_VAL_INT, ROOM_TEMP_VAL_DEC)
z
HOT_INT1V_VAL is the 2’s complement of the internal 1V reference value corresponding to
(HOT_TEMP_VAL_INT, HOT_TEMP_VAL_DEC)
(HOT_TEMP_VAL_INT, HOT_TEMP_VAL_DEC)
z
ROOM_INT1V_VAL and HOT_INT1V_VAL values are centered around 1V with a 0.001V step. In other
words, the range of values [0,127] corresponds to [1V, 0.873V] and the range of values [-1, -127]
corresponds to [1.001V, 1.127V]. INT1V == 1 - (VAL/1000) is valid for both ranges.
words, the range of values [0,127] corresponds to [1V, 0.873V] and the range of values [-1, -127]
corresponds to [1.001V, 1.127V]. INT1V == 1 - (VAL/1000) is valid for both ranges.
Using Linear Interpolation
For concise equations, we’ll use the following notations:
z
(ROOM_TEMP_VAL_INT, ROOM_TEMP_VAL_DEC) is denoted temp
R
z
(HOT_TEMP_VAL_INT, HOT_TEMP_VAL_DEC) is denoted temp
H
z
ROOM_ADC_VAL is denoted ADC
R
, its conversion to Volt is denoted V
ADCR
z
HOT_ADC_VAL is denoted ADC
H
, its conversion to Volt is denoted V
ADCH
z
ROOM_INT1V_VAL is denoted INT1V
R
z
HOT_INT1V_VAL is denoted INT1V
H
Using the (temp
R
, ADC
R
) and (temp
H
, ADC
H
) points, using a linear interpolation we have the following equation:
Given a temperature sensor ADC conversion value ADC
m
, we can infer a coarse value of the temperature temp
C
as:
[Equation 1]
Notes: 1. In the previous expression, we’ve added the conversion of the ADC register value to be expressed in V.
Notes: 1. In the previous expression, we’ve added the conversion of the ADC register value to be expressed in V.
V
ADC
V
ADCR
–
temp temp
R
–
-------------------------------------
⎝
⎠
⎛
⎞
V
ADCH
V
ADCR
–
temp
H
temp
R
–
----------------------------------------
⎝
⎠
⎛
⎞
=
temp
C
temp
R
ADC
m
1
2
12
1
–
(
)
---------------------
⋅
⎝
⎠
⎛
⎞
ADC
R
INT1V
R
2
12
1
–
(
)
---------------------
⋅
⎝
⎠
⎜
⎟
⎛
⎞
–
⎩
⎭
⎨
⎬
⎧
⎫
temp
H
temp
R
–
(
)
⋅
ADC
H
INT1V
H
2
12
1
–
(
)
---------------------
⋅
⎝
⎠
⎜
⎟
⎛
⎞
ADC
R
INT1V
R
2
12
1
–
(
)
---------------------
⋅
⎝
⎠
⎜
⎟
⎛
⎞
–
⎩
⎭
⎨
⎬
⎧
⎫
------------------------------------------------------------------------------------------------------------------------------------------------------------
+
=