May 2006
15
MIC184
MIC184
Micrel
Applications Information
Switching Zones
The recommended procedure for switching between the
internal and external zones is as follows:
1. Disable interrupts (if used)
by setting the IM bit in CONFIG.
2. Read the CONFIG register to:
a) Verify no masked interrupt was pending
(D[7] = 0)
b) Clear STS prior to switching zones
c) Hold the settings of CONFIG register for the
current zone
3. Write the appropriate values to
T_SET and T_HYST for the new zone.
4. Write to CONFIG as follows:
a) To toggle the ZONE bit (1 = remote, 0 =
internal)
b) If interrupts are being used, step 4 should
also clear MODE
5. If interrupts are being used, MODE must then be
set to 1 and IM reset to 0
At the conclusion of the serial bus transaction for step 4, the
A/D converter will begin a conversion cycle using the new
zone setting. The next conversion cycle completed after
the serial bus transaction for step 5 will result in the state of
the INT output being updated (if enabled) for the new zone.
Generally the MIC184s A/D converter operates continuously,
but it will be halted and reset each time the part recognizes
its slave address on the serial bus. Interrupted conversions
will remain halted until the end of the hosts communication
with the MIC184. After the completion of step 5 and a delay
of t
CONV
x Fault_Queue, STS and INT will contain the results
for the new zone. The above routine is extremely unlikely
to miss a temperature event, as even one A/D conversion is
typically much slower than the I
2
C/SMBus transactions that
control the MIC184. See Figure 6: A/D Converter Timing.
Step 2(c) is recommended because the MIC184 has only
one CONFIG register, corresponding to the active zone. In
order to preserve data integrity for both zones, 2(c) allows
the host to create a virtual CONFIG register for the inactive
zone by dedicating one byte of memory to that purpose.
Additional virtual registers may be created as needed by
inserting additional reads as steps 2(d), 2(e), etc. These
could for example correspond to the values in T_SET and
T_HYST immediately prior to switching zones. Steps 4(b) and
5 ensure that the MIC184 will enter the new zone searching
for an overtemperature event.
Identifying an MIC184 by Software Test
The MIC184 and the LM75 each have an eight-bit CON-
FIG register. In LM75-type parts, no more than seven of
the eight bits of this register are used, and at least one bit
(the MSB) will always return a zero. The MIC184 uses all
eight bits of the CONFIG register: the MSB is the parts
status bit (STS). A simple test by which the host can
determine whether a system has an MIC184 installed, or
is using a legacy LM75-type device, is to create a situation
which will set the MSB in the MIC184s CONFIG register
and then determine if the MSB is in fact set. Two examples
of how this can be done are outlined below. The rst is in-
terrupt-driven, the second uses software polling. Note that
both procedures generate one or more spurious interrupts.
The code for these tests should therefore temporarily dis-
able any affected interrupt routines.
{START Interrupt-Driven Test and Initialization
Routine}
1. Disable the hosts overtemperature and under-
temperature interrupt handling routine. Redirect
interrupts from the part under test to a handler
for the interrupt that will be generated in steps
(4) and (7) of this routine.
2. Write 0000 0010b (02h) to the CONFIG register.
(The assumption is made that the host is an I
2
C
or SMBus part, and therefore responds to an ac-
tive-low interrupt request.)
3. Write 1100 1000 1000 0000b = C880h to T_SET
and T_HYST. This corresponds to -55.5癈.
4. When the part has nished its rst A/D conver-
sion, INT will be asserted.
5. Read out the contents of the CONFIG register:
a) If the part is an MIC184, the MSB will be set
to one (CONFIG = 1000 0010b = 82h).
b) If the part is a conventional LM75-type part,
the MSB will be zero (CONFIG = 0000
0010b = 02h).
6.Write 0111 1111 1000 0000b = 7F80h to T_SET
and T_HYST. This corresponds to +127.5癈.
7.When the part has nished its next A/D conver-
sion, INT will be asserted a second time.
8.Read CONFIG again, to clear the interrupt re-
quest from step (7). This will also clear STS, if
the part under test is an MIC184.
9.Based on the results of the test in step (4), do the
following within 50ms total:
a) Set the CONFIG register as required.
b) Load T_HYST with its operational value.
c) Load T_SET with its operational value.
d) Set the hosts interrupt handling routine back
to overtemperature and undertemperature
mode.
{END}
{START Polling-Based Test and Initialization Rou-
tine}
1. Temporarily disable the hosts interrupt input