The function characteristic and realization circuit interface design of integrated digital temperature sensor TC77

TC77 is a 13-bit serial interface output integrated digital temperature sensor produced by Microchip Company, and its temperature data is converted by thermal sensing unit. The TC77 contains a 13-bit ADC with a temperature resolution of 0.062 5°C/LSB. Under normal operating conditions, the quiescent current is 250µA (typ). The communication between other devices and TC77 is realized by SPI serial bus or Microwire compatible interface. This bus can be used to connect multiple TC77 to realize multi-zone temperature monitoring. The SHDN bit in the configuration register CONFIG activates the low-power shutdown mode. At this time, the current Consumption is only 0.1µA (typ). TC77 has a compact size

1 Overview

TC77 is a 13-bit serial interface output integrated digital temperature sensor produced by Microchip Company, and its temperature data is converted by thermal sensing unit. The TC77 contains a 13-bit ADC with a temperature resolution of 0.062 5°C/LSB. Under normal operating conditions, the quiescent current is 250µA (typ). The communication between other devices and TC77 is realized by SPI serial bus or Microwire compatible interface. This bus can be used to connect multiple TC77 to realize multi-zone temperature monitoring. The SHDN bit in the configuration register CONFIG activates the low-power shutdown mode. At this time, the current Consumption is only 0.1µA (typ). With its compact size, low assembly cost, and ease of operation, the TC77 is ideal for system thermal management.

2. Internal structure and pin function of TC77

Figure 1 shows the schematic diagram of the internal structure of the TC77. TC77 consists of CMOS junction temperature sensor, 13-bit sigma-delta A/D converter with sign bit, temperature register, configuration register, manufacturer ID register and three-wire serial interface.

 The function characteristic and realization circuit interface design of integrated digital temperature sensor TC77

Its pins are defined as follows:

SI/O: Serial data pin

SCK: Serial Clock

Vss: ground

CE: chip select (active low)

VDD: Supply voltage (6.0 V)

3. The working principle of TC77

The digital temperature sensor TC77 obtains the temperature from a solid state (PN junction) sensor and converts it into digital data. The converted temperature digital data is then stored in its internal registers and can be read at any time via the SPI serial bus interface or Microwire compatible interface. The TC77 has two operating modes, continuous temperature conversion mode and shutdown mode. Continuous temperature conversion mode is used for continuous measurement and conversion of temperature, and shutdown mode is used for power-sensitive applications that reduce supply current.

3.1 Power-ON and reset of TC77

When power-on or Voltage reset, the TC77 is in continuous temperature conversion mode. The first valid temperature conversion at power-on or voltage reset will last about 300 ms. After the first temperature conversion, the second bit of the temperature register is reset. Set to logic “1”, and during the first temperature conversion, bit 2 of the temperature register is set to logic “0”, therefore, the first temperature conversion can be judged by monitoring the state of the second bit of the temperature register whether to end.

3.2 Low power shutdown mode of TC77

After being allowed by the TC77, the host can put it into a low-power shutdown mode. At this time, the A/D converter is suspended and the temperature data register is frozen, but the SPI serial bus port still operates normally. By setting the SHDN bit in the configuration register CONFIG, the TC77 can be placed in a low-power shutdown mode: that is, when SHDN=0, it is normal mode; when SHDN=1, it is a low-power shutdown mode.

3.3 Temperature data format of TC77

TC77 uses 13-bit two’s complement to represent temperature. Table 1 lists the relationship between TC77’s temperature, two’s complement and hexadecimal code. The least significant bit (LSB) in the table is 0.062 5°C, and the last two LSB bits (i.e., bit 1 and bit 0) are tri-stated and are “1” in the table. Bit 2 is set to logic ‘1’ at the end of the first temperature conversion after a power-up or voltage reset event.

The function characteristic and realization circuit interface design of integrated digital temperature sensor TC77

3.4 Serial bus of TC77

The serial bus of TC77 includes chip select signal line CE, serial clock signal line SCK and serial data signal line SI/O, following the SPI or Mi-crowire interface standard protocol. When there are multiple TC77 connected to the serial clock and serial data signal lines, CE is used to select one of the TC77 devices, and when CS is logic “0”, it is used to write to the device or read data from the device. Synchronous; SCK is disabled when CS is logic ‘1’. The falling edge of CS initiates inter-device communication, and the rising edge of CS stops inter-device communication. Figure 2 is the timing sequence for reading the temperature register.

Figure 3 is the multi-byte communication operation sequence of TC77, including the read operation to the temperature register and the write operation to the configuration register. The first group of 16 SCK pulses is used to transmit the temperature data of the TC77 to the microprocessor, and the second group of 16 SCK pulses is used to receive instructions from the microprocessor to put the TC77 into shutdown mode or continuous conversion mode. The data written to the TC77 configuration register should be all 0s or all 1s, corresponding to continuous conversion mode or shutdown mode, respectively. When C0~C7 of the configuration register are all 1, it is shutdown mode, and when one of C0~C7 is in shutdown mode When 0 is written, it becomes continuous conversion mode.

4. Interface between TC77 and AVR microcontroller

4.1 Hardware interface between TC77 and AVR microcontroller

The function characteristic and realization circuit interface design of integrated digital temperature sensor TC77

Figure 4 is a schematic diagram of the interface hardware connection between TC77 and AVR microcontroller. The synchronous serial three-wire SPI interface is used in the figure, which can be easily connected to a peripheral device using the SPI communication protocol or another AVR microcontroller to realize short-distance high-speed synchronous communication.

The SPI of ATmega128 uses hardware to realize byte-oriented full-duplex 3-wire synchronous communication, and supports master, slave and two SPI timings with different polarities. The SPI interface inside the ATmega128 microcontroller can also be used for programming download and upload of program memory and data E2PROM. However, it should be noted that the MOSI and MISO interfaces of the SPI no longer correspond to the PB2 and PB3 pins, but are converted to the PE0 and PE1 pins (PDI, PDO).

4.2 Software interface between TC77 and AVR microcontroller

The interface software of TC77 and AVR MCU includes main program and interrupt service routine. In the main program, the hardware SPI of ATmega128 should be initialized first. During initialization, the MOSI, SCLK, and SS pins of PORTB should be used as outputs, the MISO pin should be used as an input, and the pull-up resistors should be turned on. Then initialize the SPI registers, and read SPSR (SPX Status Reg-ister, SPI status register) and SPDR (SPI Data Register SPI, data register) once, so that the ISP is idle and waiting for data to be sent. AVR’s SPI consists of a 16-bit circular shift register. When the data is shifted out from the master, the data of the slave is also shifted in, so the transmission and reception of the SPI can be completed in the same interrupt service routine. In the SPI interrupt service routine, first read a received byte from SPDR and store it in the receive data buffer, then take out a byte from the transmit data buffer and write it into SPDR, which is sent to the slave by the ISP. Once data is written to SPDR, the ISP hardware starts sending data. The next time the ISP is interrupted means that the transmission is completed and a data is received at the same time. In the program, putSPIchar() and getSPIchar() are the bottom-level interface functions of the application, and two data buffers are also used to form circular queues respectively. The following code is an interface program for continuous batch output and input of data through the SPI host mode:

5. Conclusion

TC77 can be directly connected with MCU with SPI or the same interface, for MCU without SPI interface, SPI operation can be synthesized through software programming. The TC77 is ideal for low-cost and small-scale applications of temperature measurement and control, such as thermal protection of computer hard drives or other PC peripherals, as well as less demanding temperature measurement and control systems.