TSicTM Temperature Sensor IC Application Notes – ZACwire™ Digital Output
HYGROSENS INSTRUMENTS GmbH Postf ach 1054 Rights reserv ed f or change in technical data! 1 TSicTM ZACwire™ Communication Protocol............................................................................3 1.1 Temperature Transmission Packet from a TSicTM............................................................3 1.2 Bit Encoding.......................................................................................................................4 1.3 How to Read a Packet...............................
In end-user applications. the TSicTM will be transmitting temperature information, and another IC in the system (most likely a Controller) will be reading the temperature data over the ZACwire™. 1.1 Temperature Transmission Packet from a TSicTM The TSicTM transmits 1-byte packets. These packets consist of a start bit, 8 data bits, and a parity bit. The nominal baud rate is 8kHz (125microsec bit window). The signal is normally high.
Start bit => 50% duty cycle used to set up strobe time Logic 1 => 75% duty cycle Logic 0 => 25% duty cycle Perhaps the best way to show the bit encoding is with an oscilloscope trace of a ZACwire™ transmission. The following shows a single packet of 96Hex being transmitted. Because 96Hex is already even parity, the parity bit is zero. 1.3 How to Read a Packet When the falling edge of the start bit occurs, measure the time until the rising edge of the start bit. This time (Tstrobe) is the strobe time.
The ZACwire™ line is driven by a strong CMOS push/pull driver. The parity bit is intended for use when the ZACwire™ is driving long (>2m) interconnects to the μController in a noisy environment. For systems in which the “noise environment is more friendly,” the user can choose to have the μController ignore the parity bit. In the appendix of this document is sample code for reading a TSic TM ZACwire™ transmission using a PIC16F627 μController. 1.4.
TEMP_HIGH EQU 0X24 ;; MEMORY LOCATION RESERVED FOR TEMP HIGH BYTE TEMP_LOW EQU 0X25 ;; MEMORY LOCATION RESERVED FOR TEMP LOW BYTE ;; THIS BYTE MUST BE CONSECUTIVE FROM TEMP_HIGH LAST_LOC EQU 0X26 ;; THIS BYTE MUST BE CONSECUTIVE FROM TEMP_LOW TSTROBE EQU 0X26 ;; LOCATION TO STORE START BIT STROBE TIME. ORG 0X004 ;; ISR LOCATION CODE TO SAVE ANY NEEDED STATE AND TO DETERMINE THE SOURCE OF THE ISR GOES HERE.
;; WAIT FOR FALL OF ZAC WIRE GOTO PAUSE_STRB ;; NEXT FALLING EDGE OCCURRED INCFS Z TIME_OUT,1 ;; CHECK IF EDGE TIME OUT COUNTER OVERFLOWED GOTO RTI ;; EDGE TIME OUT OCCURRED. GOTO WAIT_FALL PAUSE_STRB: INCF STRB_CNT,1 ;; INCREMENT THE STROBE COUNTER MOVF TSTROBE,0 ;; MOVE TSTROBE TO W REG SUBWF STRB_CNT,0 ;; COMPARE STRB_CNT TO TSTROBE BTFSS STATUS,Z ;; IF EQUAL THEN IT IS TIME TO STROBE GOTO PAUSE_STRB ;; ZAC WIRE FOR DATA, OTHERWISE KEEP COUNTING LENGTH OF THIS LOOP IS 6-STATES.
WAIT_PF GOTO RTI ;; EDGE TIMEOUT OCCURRED P_RISE: CLRF TIME_OUT ;; CLEAR THE EDGE TIME OUT COUNTER WAIT_PR: BTFSC PORTB,0 ;; WAIT FOR RISE OF PARITY GOTO NEXT_BYTE INCFS Z TIME_OUT,1 GOTO WAIT_PR GOTO RTI ;; EDGE TIME OUT OCCURRED INCF FSR,1 ;; INCREMENT THE INDF POINTER MOVLW LAST_LOC SUBWF FSR,0 ;; COMPARE FSR TO LAST_LOC BTFSS STATUS,Z ;; IF EQUAL THEN DONE GOTO WAIT_TLOW ;; INCREMENT EDGE TIME OUT COUNTER IF HERE YOU ARE DONE READING THE ZAC WIRE AND HAVE THE DATA IN T
The technical information in this document has been checked with adequate care at our end and is intended to inform about the product and its applications. The descriptions are not to be understood as assurance of the defined characteristics of the product and should be checked by the user for the intended application. Any possible industrial third party patent rights are to be considered. Issued October 2008 - This documentation supersedes all previous editions. © Copyright 2008 HYGROSENS INSTRUMENTS GmbH.