English
Language : 

MIC74_14 Datasheet, PDF (15/20 Pages) Micrel Semiconductor – 2-Wire Serial I/O Expander and Fan Controller
Micrel, Inc.
MIC74
Polled Mode
Input state changes on I/Os configured as inputs will be
reflected in the status register regardless of the state of the
global interrupt enable bit (IE) and the individual interrupt
mask bits in INT_MASK. In a system utilizing polling to
monitor for input changes, the status register is periodically
read to check for input events. The act of reading STATUS
clears it in preparation for detecting future events. The
status bits corresponding to I/Os configured as outputs or
corresponding to P[7:4] when in fan mode will not be set
by state changes on these pins. It is always good practice,
however, to mask the value obtained when reading
STATUS to eliminate any bits, output or otherwise, that are
not of immediate concern. This will help avoid problems if
software changes are made in the future.
The flowchart shown in Figure 9 illustrates the steps
involved in initializing the MIC74 for polled operation. The
flowchart in Figure 11 illustrates the corresponding polling
routine. The process for writing output data is straight-
forward—simply write the desired bit pattern to DATA.
Special precautions may be required when changing
output data in an interrupt driven system, however. See
the Writing to the Data Register section.
Interrupt Mode
Input state changes on I/Os configured as inputs will be
reflected in the status register regardless of the state of the
global interrupt enable bit (IE) and the individual interrupt
mask bits in INT_MASK. In a system utilizing interrupts to
detect input changes, one or more of the bits in the
interrupt mask register, INT_MASK, are set to allow
interrupts on /ALERT to be generated by input events. The
global interrupt enable bit, IE, in the device configuration
register must also be set to enable interrupts.
The flowchart shown in Figure 10 illustrates the steps
involved in initializing the MIC74 for interrupt-driven
operation. The flowchart in Figure 12 illustrates the
corresponding interrupt service routine using the SMBus
ARA. The corresponding timing diagram is shown in
Figure 7. The flowchart in Figure 13 illustrates the
corresponding interrupt service routine using polling to
determine the interrupt source. Figure 8 illustrates the
timing. Utilizing the ARA greatly speeds identification of
the interrupting slave device and lowers latency, as only a
single transaction on the bus is necessary to identify the
interrupt source.
Using either method, STATUS must be read to determine
the exact source of the interrupt within the MIC74.
September 30, 2014
Figure 11. Polling the MIC74
15
Revision 3.0