Abstract: ADT7301 is introduced AD 13-bit digital temperature sensor chip. The chip +2.7 V ~ +5.5 V power supply, with a temperature conversion of high precision, low power consumption, convenient and flexible serial interface. ADT7301 paper introduces the main features, and its interfaces with the 8052 case, given the ADT7301 serial interface circuit applications.
Keywords: temperature sensor; SPI; ADT7301
1 Overview
ADT7301 is a complete temperature monitoring system, there are two kinds of SOT-32 and MSOP packages. Integrated inside the chip for temperature monitoring of a band gap temperature sensor and a 13-bit AD converter, the minimum temperature resolution of 0.03125 ° C. ADT7301 with a very flexible serial interface, can be very easily with most of the micro-controller interface; and the interface can be used with SPITM, QSPI and MICROWIRETM Agreement and DSP interfaces compatible device through the serial port control allows the standby mode. ADT7301's wide power supply range, low supply current and compatible with the SPI interface makes the device very suitable for personal computers, office equipment and appliances and other areas.
ADT7301 features are as follows:
Power supply +2.7 V ~ +5.5 V;
13-bit digital temperature sensor included;

temperature measurement accuracy of ± 0.5 ;
The temperature resolution of 0.03125 ;
Operating current is typically 1µA;
DSP-compatible with SPI and serial interface;
wide operating temperature range of -40 ~ +150 ;
space-saving SOT-23 and MSOP packages.
2 shows the internal structure and the pin
2.1 Pin description
ADT7301 module's internal structure shown in Figure 1. The device has a 6 pin and 8-pin SOT-23 MOSP two packages, the pin function as follows:
GND: analog and digital ground;
DIN: serial data input. Register data into the chip to control the clock SCLK rising edge in the serial input through the pin;
VDD: Power supply positive input. Power supply range: +2.7 V ~ +5.5 V;
SCLK: serial port with the corresponding serial clock input;
CS: chip select input, active low;
DOUT: serial data output port. Temperature falling edge of serial clock SCLK pin through the serial output.
ADT7301 serial interface consists of CS, SCLK, DIN and DOUT four-wire. The CS and DIN ground can work in two lines of the interface model, in this mode, the interface only through DOUT to read the data register value. Recommended CS port, it is a good synchronization between the ADT7301 and its master device. DIN port for write control register, but also allows the chip in power-saving mode. When used in the power and ground should be added between a 0.1µF decoupling capacitors.

2.2 Application process and timing of work
ADT7301 internal integrated crystal oscillator, so the only work the clock in the serial port access, but do not need to provide A / D conversion clock. The chip has two modes, normal operating mode and power saving modes. In normal mode, internal clock oscillator to drive automatic conversion timing, so that the analog circuit chip power every second time, for a temperature conversion. Temperature conversion normally takes to complete a 800µs, after conversion, auto power analog chips and power automatically after 1 second. Therefore, in the temperature register can always get the latest temperature conversion value.
ADT7301 by setting the control register can be set to power saving mode. In the power-saving mode, the on-chip oscillator is shut down, ADT7301 without temperature conversion, until the return to normal operating mode. Can be written to control register zero to restore to normal operation mode. before entering power-saving mode even when the temperature conversion results into the power-saving mode can still be read correctly.
In the normal conversion mode, the read / write operation, the internal oscillator can be automatically reset after the read and write operations, so that the temperature converter temperature can be re-conversion. If the temperature in the ADT7301 read and write operations to perform the conversion process is to automatically stop conversion, and again after the end of the serial communication began, and read the temperature value is the previous conversion result. ADT7301 the read / write operation timing shown in Figure 2.
When the chip select port CS is low, SCLK clock input is valid, and in the read operation, the system will be two zero flag, a sign bit and 13 bit data bits in 16 clock pulses on the falling edge from the temperature Remove the register. If the CS low time continues to more than 16 SCLK clock cycles, ADT7301 will loop zero flag outputs plus two 14-bit value bit. Once CS goes high, DOUT is high impedance output state of the output data will this time the falling edge of SCLK DOUT line is latched.
ADT7301 write and read operations can be conducted concurrently. When writing the data stream while the remaining third to write a bit is 0, ADT7301 into power saving mode; write the whole data stream is 0 for normal operation. data in normal operating mode in the first 16 SCLK rising edge of the control register is loaded and immediately work. If the CS rising edge in the first 16 SCLK goes high before, then the control register data will not be loaded, but this time the work of the same pattern.
Temperature 2.3 code
Temperature value register is a 14-bit read-only register used to store 13-bit ADC, plus a complement of the temperature conversion result sign bit (MSB is sign bit). In theory, ADC measured temperature range up to 255 ?, in fact, the internal temperature sensor to ensure that the temperature range of -40 ~ +150. Temperature data format, such as listed in Table 1.
Table 1 Temperature data format register
Temperature data output DB13DB0
0000 0000 -4011,1011
-3011,1100 01,000,000
-2511,1100 11,100,000
1100 0000 -1011,1110
-0.312511,1111 1111 1111
000,0000 0000 0000
+0.312500,0000 0000 0001
+1000,0001 01,000,000
+2500,0011 0010 0000
+5000,0110 01,000,000
+7500,1001 01,100,000
+10000,1100 1000 0000
+12500,1111 1010 0000
+15001,0010 1100 0000
The temperature conversion formula is as follows:
Positive temperature value = ADC conversion result code (d) / 32;
Negative temperature value = (ADC conversion result code (d) -16384) / 32 (using the sign bit);
Negative temperature value = (ADC conversion result code (d) -8192) / 32 (do not use sign bit).
Application Circuit 3
3.1 ADT7301 serial interface circuit and MCU
Figure 3 shows the ADT7301 and the microcontroller serial communication interface circuit, the interface mode has the advantage of fast conversion speed, but can not be set to power saving mode.
It should be noted here is: Since the microcontroller serial communication is the first low to high, and ADT7301 temperatures in the external serial output value is to high to low, so low bit swap to conduct and then processed given the specific process is no longer here. The following are ADT7301 8051 for serial interface with the software programming:
;***** Main *****
main:
call receive ; read the temperature subroutine
call dispose; read the results of subroutine
sjmp $
; # # # # # # Serial communication subroutine
receive: setb p1.3
mov scon, # 11h ; choose to receive serial port for Mode 0
mov r7, # 2; byte count
mov r0, # 30h; point temperature buffer
clr p1.3; strobe ADT7301
clr ri ; clear receive interrupt flag, ready to receive
loop: jnb ri, $
mov a, sbuf
mov @ r0, a
inc r0
clr ri
djnz r7, loop
setb p1.3
ret
3.2 ADT7301 full-duplex communication interface with the microcontroller
By ADT7301 full-duplex communication interface with the microcontroller can ADT7301 work in power saving mode. Figure 4 is the ADT7301 and the 8051 full-duplex communication interface connection diagram. The corresponding software programming as follows.
# # # # # # full-duplex communication subroutine
setb p1.3
mov r0, # 30h ; read temperature buffer 30h31h
mov r1, # 32h ; control register writes the value (32h33h)
mov r6, # 08h ; cyclic shift count
mov r7, # 02h ; byte count
clr p1.3 ; strobe
loop0:
setb p1.0 ; control p1.0 generated falling edge
clr p1.0 ; ready to read data
mov cy, p1.1 ; reading
mov a, @ r0 ; will re-load the last Results
rlc a ; shift the store to read the results
mov @ r0, a ; temporary
mov a, @ r1 ; the value to be written to the accumulator
rlc a ; out of bits to be written
mov p1.2, cy ; cycle write
mov @ r1, a ; temporary
djnz r7 loop0
inc r0
inc r1
djnz r7, loop0
clr p1.3
ret
4 Conclusion
ADT7301 can be used to measure the surface temperature of objects or air temperature. Since the device uses low-power design, therefore, heat conduction in the use of adhesive will bond to the object surface ADT7301, the measured surface temperature and the difference between the actual temperature does not exceed 0.1. In addition, when the ambient temperature measured object surface temperature and measured temperature difference exists, they should pay attention to the back of the device and isolate pin and the surrounding air. As the die ground pins provide the best way to heat conduction, so the die temperature and ground temperature of the printed circuit board closest to the pin and it should be tested to ensure good contact surface.
The temperature sensor should not be a long period of extreme working condition, when the work +150 , the life of the device is its work in +55 ? 5% of the time. When the long-term limit in the voltage and temperature, the structural integrity of the device will also be destroyed.