At power up, the device tries to establish a communication with the local sensor. If the local sensor exists, then it will display read temperature (TEMP1) for a number of seconds (TS1) set by the user. While working, the device always listens for infrared signal on a dedicated pin. If no valid infrared signal is detected, then only the local sensor is displayed. The user can connect the pin 6 (RB0) to +5V and drop the TSOP1738 usage, in the case external IR temperature is not needed. Local temperature conversion occurs when seconds (TS1) rolls over to 0. This means that user will read a new temperature conversion at every TS1 interval.
If a valid infrared signal is present, a flag inside the chip is set. When the seconds (TS1) to display local temperature (TEMP1) elapsed, the temperature received through infrared signal will be displayed (TEMP2), also for a number of seconds set by the user (TS2). When the seconds to display external temperature (TEMP2) elapsed, then local temperature (TEMP1) will be displayed. The last digit 4 will blink between C or F and 1 or 2, meaning Celsius/Fahrenheit and first(local)(1)/second(infrared)(2) sensors being displayed. Read more about digit 4 in section 4. „Displaying temperatures” from the documentation.
The device can function without the local sensor. In this case, the user must connect pin 1 (RA2) to ground through a 4.7K resistor. In this case, local sensor is not detected and the device will start a countdown from 70 down to 0 to ensure the user that infrared signal is awaited. The countdown will start again until valid infrared signal is detected. If an infrared signal occur then the received temperature will be displayed and the countdown reset. While displaying temperature, if for 210 seconds no infrared signal is detected, then the device will again enter in 70 seconds countdown mode. TS2 has no meaning in this mode.