ATmega88PA Automotive Atmel Corporation, ATmega88PA Automotive Datasheet - Page 261

no-image

ATmega88PA Automotive

Manufacturer Part Number
ATmega88PA Automotive
Description
Manufacturer
Atmel Corporation
24.8.1
9223B–AVR–09/11
Manufacturing Calibration
Calibration values determined during test are available in the signature row.
The temperature in degrees Celsius can be calculated using the formula:
Where:.
The following code example allows to read Signature Row data
-------------------------------------------------------------------------------------------------------------------------------------------------------------- -
ADCH<<8
.equ TS_GAIN = 0x0003
.equ TS_OFFSET = 0x0002
LDI R30,LOW(TS_GAIN)
LDI R31,HIGH (TS_GAIN)
RCALL Read_signature_row
MOV R17,R16 ; Save R16 result
LDI R30,LOW(TS_OFFSET)
LDI R31,HIGH (TS_OFFSET)
RCALL Read_signature_row
; R16 holds TS_OFFSET and R17 holds TS_GAIN
Read_signature_row:
IN R16,SPMCSR ; Wait for SPMEN ready
SBRC R16,SPMEN ; Exit loop here when SPMCSR is free
RJMP Read_signature_row
LDI R16,((1<<SIGRD)|(1<<SPMEN)) ; We need to set SIGRD and SPMEN together
OUT SPMCSR,R16 ; and execute the LPM within 3 cycles
LPM R16,Z
RET
Atmel ATmega48PA/88PA/168PA [Preliminary]
a.
b.
c.
+
TS_OFFSET is the temperature sensor offset correction term
TS_GAIN is the unsigned fixed point 8-bit temperature sensor gain factor in
1/128th units stored in the signature row.
TS_OFFSET is the signed twos complement temperature sensor offset reading
stored in the signature row. See
parameter address
ADCH & ADCL are the ADC data registers,
is the temperature sensor gain
ADCL
TS_GAIN
273
+
100 TS_OFFSET
Table 27-5 on page 286
128
+
25
for signature row
261

Related parts for ATmega88PA Automotive