Information

page 5
Released 10/2008 Rights reserv ed f or change in technical data! HYGROSENS INSTRUMENTS GmbH Postf ach 1054 D-79839 Löf f ingen Tel: +49 7654 808969-0 Fax: +49 7654 808969-9
ZACWIRE
TM
DIGITAL OUTPUT
1.4 How to Read a Packet using a µController
It is best to connect the ZACwire™ signal to a pin of the μController that is capable of
causing an interrupt on a falling edge. When the falling edge of the start bit occurs, it
causes the μController to branch to its ISR. The ISR enters a counting loop
incrementing a memory location (Tstrobe) until it sees a rise on the ZACwire™signal.
When Tstrobe has been acquired, the ISR can simply wait for the next 9 falling edges
(8-data, 1-parity). After each falling edge, it waits for Tstrobe to expire and then
sample the next bit.
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.1 How Often Does the TSic
TM
Transmit?
If the TSic
TM
is being read via an ISR, how often is it interrupting the μController with
data? The update rate of the TSic
TM
can be programmed to one of 4 different settings:
250Hz, 10Hz, 1Hz, and 0.1Hz. Servicing a temperature-read ISR requires about
2.7ms. If the update rate of the TSic
TM
is programmed to 250Hz, then the μController
spends about 66% of its time reading the temperature transmissions. If, however, the
update rate is programmed to something more reasonable like 1Hz, then the
µController spends about 0.27% of its time reading the temperature transmissions.
1.4.2 Solutions if Real Time System Cannot Tolerate the TSic
TM
Interrupting the µController
Some real time systems cannot tolerate the TSic
TM
interrupting the μController. The
μController must initiate the temperature read. This can be accomplished by using
another pin of the μController to supply VDD to the TSic
TM
. The TSic
TM
will transmit its
first temperature reading approximately 65- 85ms after power up. When the
μController wants to read the temperature, it first powers the TSicTM using one of its
port pins. It will receive a temperature transmission approximately 65 to 85ms later. If
during that 85ms, a higher priority interrupt occurs, the μController can simply power
down the TSic
TM
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
TM
has the additional benefit of acting like a power down mode and reducing the
quiescent current from a nominal 150μA to zero. The TSic
TM
is a mixed signal IC and
provides best performance with a clean VDD supply. Powering through a μController
pin does subject it to the digital noise present on the μController’s power supply.
Therefore it is best to use a simple RC filter when powering the TSic
TM
with a
μController port pin. See the diagram below.