English
Language : 

MIC74 Datasheet, PDF (12/20 Pages) Micrel Semiconductor – 2-Wire Serial I/O Expander and Fan Controller Advance Information
MIC74
Initializing the MIC74
The MIC74’s internal registers are reset to their default state
at power-on. The MIC74’s default state can be summarized
as follows:
• All I/O’s configured as inputs (DIR = 00h)
• Output configuration set to open-drain
(OUT_CFG = 00h)
• All outputs high/floating (DATA = FFh)
• Fan functions disabled (FAN_SPEED = 00h,
FAN bit of DEV_CFG = 0)
• All interrupts masked (IE bit of DEV_CFG = 0)
The result of this configuration is that all I/O pins will essen-
tially float unless driven by external circuitry. Any system
using the MIC74 will need to initialize the internal registers to
the state required for proper system operation. The recom-
mended order for initializing the MIC74’s registers is as
follows:
Micrel
1. Write DATA
2. Write OUT_CFG
3. Write DIR
4. Write FAN_SPEED (if using fan mode)
5. Write INT_MASK (if using interrupts)
6. Read STATUS to clear it.
7. Write DEV_CFG to enable fan mode and/or
interrupts, if using
At the conclusion of step three, any I/O’s configured as
outputs in step two will be driven to the levels programmed
into the data register in step one. The order of step 1 through
step 3 is important to insure that spurious data does not
appear at the I/O’s during configuration. Following step 7,
programming the device configuration register, the MIC74
will begin generating interrupts if they are enabled, and the
fan will be started if FAN_SPEED contains a nonzero value.
The corresponding interrupt service routines (if any) must be
initialized and enabled prior to step seven. STATUS should
be cleared (step 6) in both polled and interrupt driven sys-
tems.
Initialize for
polling
Write desired output
values to DATA
Set output configuration
in OUT_CFG
Set desired I/O's as
outputs by writing DIR
Set initial fan speed in
FAN_SPEED (if using)
Write DEV_CFG to
turn on fan (if using)
Read STATUS
to clear it
Initialization
complete
Figure 9a. Initializing the MIC74 for Polled Operation
Initialize for
interrupts
Write desired ouput
values to DATA
Set output configuration
in OUT_CFG
Set desired I/O's as
outputs by writing DIR
Set initial fan speed in
FAN_SPEED (if using)
Write INT_MASK to
enable interrupts
(if using)
Read STATUS to
clear it
Write DEV_CFG to
turn on interrupts
and fan (if using)
Initialization
complete
Figure9b. Initializing the MIC74 for Interrupts
MIC74
12
August 1, 2000