ADT7301
Rev. B | Page 12 of 16
APPLICATIONS INFORMATION
MICROPROCESSOR INTERFACING
The ADT7301 serial interface allows easy interface to most
microcomputers and microprocessors. Figure 15 to Figure 18
show some typical interface circuits. The serial interface on the
ADT7301 consists of four wires:
CS
, DIN, DOUT, and SCLK.
All interface circuits shown use all four interface lines. However,
it is possible to operate the interface with three wires. If the
application does not require the power-down facility offered
by the ADT7301, the DIN line can be tied low permanently.
Thus, the interface can be operated from just three wires: SCLK,
CS
, and DOUT.
The serial data transfer to and from the ADT7301 requires a
16-bit read operation. Many 8-bit microcontrollers have 8-bit
serial ports, and this 16-bit data transfer is handled as two 8-bit
transfers. Other microcontrollers and DSP processors transfer
16 bits of data in a serial data operation.
ADT7301-to-MC68HC11 Interface
Figure 15 shows an interface circuit between the ADT7301 and
the MC68HC11 microcontroller. The MC68HC11 is configured
in master mode with its CPOL and CPHA bits set to a Logic 1.
When the MC68HC11 is configured like this, its SCLK line idles
high between data transfers. Data is transferred to and from the
ADT7301 in two 8-bit serial data operations. Figure 15
shows
the full (4-wire) interface. PC1 of the MC68HC11 is configured
as an output and is used to drive the
CS
input.
ADT7301*
SCLK
DOUT
DIN
MC68HC11*
SCLK
MISO
MOSI
PC1
02884-0-008
*ADDITIONAL PINS OMITTED FOR CLARITY
CS
Figure 15. ADT7301-to-MC68HC11 Interface
ADT7301-to-8051 Interface
Figure 16 shows an interface circuit between the ADT7301 and
the microcontroller. The 8051 is configured in its Mode 0 serial
interface mode. The serial clock line of the 8051 (on P3.1) idles
high between data transfers. Data is transferred to and from the
ADT7301 in two 8-bit serial data operations. The ADT7301
outputs the MSB of its data stream as the first valid bit while the
8051 expects the LSB first. Thus, the data read into the serial
buffer needs to be rearranged before the correct data-word from
the ADT7301 is available in the accumulator.
In the example shown in Figure 16, the ADT7301 is connected
to the serial port of the 8051. Because the serial interface of the
8051 contains only one data line, the DIN line of the ADT7301
is tied low in Figure 16.
For applications that require the ADT7301 power-down feature,
the serial interface should be implemented using data port lines
on the 8051. This allows a full-duplex serial interface to be
implemented. The method involves generating a serial clock on
one port line while using two other port lines to shift data
in and out with the fourth port line connecting to
CS
. Port
lines 1.0 to 1.3 (with P1.1 configured as an input) can be used
to connect to SCLK, DOUT, DIN, and
CS
, respectively, to
implement this scheme.
ADT7301*
02884-0-009
SCLK
DOUT
DIN
8051*
P3.1
P3.0
P1.2
P1.3
*ADDITIONAL PINS OMITTED FOR CLARITY
CS
Figure 16. ADT7301-to-8051 Interface
ADT7301-to-PIC16C6x/7x Interface
Figure 17 shows an interface circuit between the ADT7301 and
the PIC16C6x/7x microcontroller. The PIC16C6x/7x synchro-
nous serial port (SSP) is configured as an SPI master with the
clock polarity bit set to a Logic 1. In this mode, the serial clock
line of the PIC16C6x/7x idles high between data transfers. Data
is transferred to and from the ADT7301 in two 8-bit serial data
operations. In the example shown in Figure 17
, port line RA1 is
being used to generate the
CS
for the ADT7301.
ADT7301*
SCLK
DOUT
DIN
PIC16C6x/7x*
SCK
SDO
SDI
RA1
02884-0-010
*ADDITIONAL PINS OMITTED FOR CLARITY
CS
Figure 17. ADT7301-to-PIC16C6x/7x Interface
ADT7301
Rev. B | Page 13 of 16
The following software program shows how to program a
PIC16F873 to communicate with the ADT7301. The
PIC16F873 is configured as an SPI master with the Port A.1 pin
used as
CS
. Any microchip microcontroller can use this
program by simply exchanging the include file for the device
that is being used.
#include <16F873.h>
#device adc = 8
#use delay(clock = 4000000)
#fuses NOWDT,XT, PUT, NOPROTECT, BROWNOUT, LVP
#BIT CKP = 0x14.4
#define CS PIN_A1
void main(){
int MSByte,LSByte;
long int ADC_Temp_Code;
float TempVal,ADC_Temp_Code_dec;
setup_spi(spi_master); //Pic is set up as master device.
CKP = 1; //Idle state of clock is high.
do{
delay_ms(10); //Allow time for conversions.
Output_low(CS); //Pull CS low.
delay_us(10); //CS to SCLK set-up time.
MSByte = SPI_Read(0); //The first byte is clocked in.
LSByte = SPI_Read(0); //The second byte is clocked in.
delay_us(10); //SCLK to CS set-up time.
Output_High(CS); //Bring CS high.
ADC_Temp_Code = make16(MSByte,LSByte); //16 bit ADC code is stored ADC_Temp_Code.
ADC_Temp_Code_dec = (float)ADC_Temp_Code; //Convert to float for division.
if ((0x2000 & ADC_Temp_Code) == 0x2000) //Check sign bit for negative value.
{
TempVal = (ADC_Temp_Code_de
c - 16384)/32; //Conversion formula if negative temperature.
}
else
{
TempVal = (ADC_Temp_Code_dec/32); //Conversion formula if positive temperature.
}
}while(True);
//Temperature value stored in TempVal.
}
ADT7301
Rev. B | Page 14 of 16
ADT7301-to-ADSP-21xx Interface
Figure 18 shows an interface between the ADT7301 and the
ADSP-21xx DSP processor. To ensure correct operation of the
interface, the SPORT control register should be set up as follows:
TFSW = RFSW = 1, alternate framing
INVRFS = INVTFS = 1, active low framing signal
DTYPE = 00, right justify data
SLEN = 1111, 16-bit data-words
ISCLK = 1, internal serial clock
TFSR = RFS = 1, frame every word
IRFS = 0, RFS configured as input
ITFS = 1, TFS configured as output
The interface requires an inverter between the SCLK line of the
ADSP-21xx and the SCLK input of the ADT7301. On the
ADSP-21xx interface, the TFS and RFS of the SPORT are tied
together; TFS is set as an output, and RFS is set as an input. The
DSP operates in alternate framing mode and the SPORT control
register is set up as described in this section.
ADT7301*
SCLK
DOUT
DIN
ADSP-21xx*
SCK
DR
DT
RFS
02884-0-011
*ADDITIONAL PINS OMITTED FOR CLARITY
TFS
CS
Figure 18. ADT7301-to-ADSP-21xx Interface
MOUNTING THE ADT7301
The ADT7301 can be used for surface or air temperature
sensing applications. If the device is cemented to a surface with
a thermally conductive adhesive, the die temperature will be
within about 0.1°C of the surface temperature because of the
ADT7301s low power consumption. Care should be taken to
insulate the back and leads of the device if the ambient air
temperature is different from the surface temperature being
measured.
The ground pin provides the best thermal path to the die;
therefore, the temperature of the die is close to that of the
printed circuit ground track. Care should be taken to ensure
that this is in good thermal contact with the measured surface.
As in any IC, the ADT7301 and its associated wiring and
circuits must be kept free from moisture to prevent leakage and
corrosion, particularly in cold conditions where condensation is
more likely to occur. Water-resistant varnishes and conformal
coatings can be used for protection. The small size of the
ADT7301 allows it to be mounted inside sealed metal probes,
which provide a safe environment for the device.
SUPPLY DECOUPLING
The ADT7301 should be decoupled with a 0.1 µF ceramic
capacitor between V
DD
and GND. This is particularly important
if the ADT7301 mount is remote from the power supply.

EVAL-ADT7301EBZ

Mfr. #:
Manufacturer:
Analog Devices Inc.
Description:
Temperature Sensor Development Tools EVAL BRD ADT7301
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union