Download Print this page

IST TSic 206 Application Note page 8

Temperature sensor ic

Advertisement

5.7 Solutions if Real Time System Cannot Tolerate the TSic Interrupting the µController
Some real time systems cannot tolerate the TSic interrupting the µController. The µController must initiate the tempe-
rature read. This can be accomplished by using another pin of the µController to supply V
transmit its first temperature reading approximately 65-85 ms
to read the temperature, it first powers the TSic using one of its port pins. It will receive a temperature transmission
approximately 65 ms to 85 ms later. If during that 85 ms, a higher priority interrupt occurs, the µController can simply
power down the TSic to ensure it will not cause an interrupt or be in the middle of a transmission when the high
priority ISR finishes. This method of powering the TSic has the additional benefit of acting like a power down mode
and reducing the quiescent current from a nominal 45 µA to zero. The TSic is a mixed signal IC and provides best
performance with a clean V
on the µController's power supply. Therefore it is best to use a simple RC filter when powering the TSic with a µCon-
troller port pin. See the diagram below
1) This value is depending on the temperature. In lower temperatures this value can be lower too
5.8 Appendix A: An Example of PIC1 Assembly Code for Reading the ZACwire
In the following code example, it is assumed that the ZACwire
the PIC and that the interrupt is configured for falling edge interruption.
This code should work for a PIC running between 2 MHz to12 MHz.
TEMP_HIGH
TEMP_LOW
LAST_LOC
TSTROBE
ORG
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CODE TO SAVE ANY NEEDED STATE AND TO DETERMINE THE SOURCE OF THE ISR GOES HERE. ONCE YOU HAVE
DETERMINED THE SOURCE IF THE INTERRUPT WAS A ZAC WIRE TRANSMISSION THEN YOU BRANCH TO ZAC_TX
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ZAC_TX:
GET_TLOW:
ATTSic_E2.1.4 | App Note | Temperature Sensor IC
supply. Powering through a µController pin does subject it to the digital noise present
DD
EQU
0X24
;; MEMORY LOCATION RESERVED FOR TEMP HIGH BYTE
EQU
0X25
;; MEMORY LOCATION RESERVED FOR TEMP LOW BYTE
;; THIS BYTE MUST BE CONSECUTIVE FROM TEMP_HIGH
EQU
0X26
;; THIS BYTE MUST BE CONSECUTIVE FROM TEMP_LOW
EQU
0X26
;; LOCATION TO STORE START BIT STROBE TIME
0X004
;; ISR LOCATION
MOVLW TEMP_HIGH
MOVWF FSR
MOVLW 0X02
MOVWF TSTROBE
CLRF
INDF
(@RT) after power up. When the µController wants
1)
pin is connected to the interrupt pin (PORTB, 0) of
TM
;; MOVE ADDRESS OF TEMP_HIGH (0X24) TO W REG
;; FSR = INDIRECT POINTER, NOW POINTING TO TEMP_HIGH
;; START TSTROBE COUNTER AT 02 TO ACCOUNT FOR
;; OVERHEAD IN GETTING TO THIS POINT OF ISR
;; CLEAR THE MEMORY LOCATION POINTED TO BY FS
to the TSic. The TSic will
DD
TM
8/15

Advertisement

loading

Related Products for IST TSic 206