Datasheet
MCP79410/MCP79411/MCP79412
DS20002266E-page 36 2010-2013 Microchip Technology Inc.
9.1.3 ACKNOWLEDGE POLLING
Since the device will not acknowledge an EEPROM
command during an EEPROM write cycle, this can be
used to determine when the cycle is complete. This
feature can be used to maximize bus throughput. Once
the Stop condition for a Write command has been
issued from the master, the device initiates the
internally timed write cycle. ACK polling can be initiated
immediately. This involves the master sending a Start
condition, followed by the control byte for a Write
command (R/W
= 0). If the device is still busy with the
write cycle, then no ACK will be returned. If no ACK is
returned, then the Start bit and control byte must be
resent. If the cycle is complete, then the device will
return the ACK, and the master can then proceed with
the next Read or Write command. See Figure 9-4 for
the flow diagram.
FIGURE 9-4: ACKNOWLEDGE
POLLING FLOW
Send
EE Write Command
Send Stop
Condition to
Initiate EE Write Cycle
Send Start
Send Control Byte
with R/W = 0
Did Device
Acknowledge
(ACK = 0)?
Next
Operation
NO*
YES
Note*: For added system robustness, implement
time-out checking to avoid a potential infinite loop.
Note: For added systems robustness, it is
recommended that time-out functionality
be implemented in the acknowledge poll-
ing routine to avoid potentially hanging the
system by entering an infinite loop. This
can easily be done by designing in a
maximum number of loops the routine will
execute, or through the use of a hardware
timer
If a time out occurs, polling should be
aborted by sending a Stop condition. A
user-generated error-handling routine can
then be called, allowing the system to
recover in a manner appropriate for the
application.