How is the tWR delay time checked and controlled when writing to the EEPROM in the HT46R46E?
Answer Before an EEPROM write operation instruction has ended and after the device has received a stop condition instruction the device will enter an automatically generated write cycle. During this time no other EEPROM instructions can be executed. Before any other instructions are executed a tWR delay time must be provided. The specification states that the maximum time for tWR is 5ms, which is the maximum write time and which is the most reliable time for the EEPROM operation. We can cyclically check if the write period has finished. One method is to send a start condition instruction and then a write address instruction to the EEPROM, after which the device can look for an acknowledge signal. If the EEPROM has finished its internal write cycle, then it will return an ACK signal, otherwise no ACK signal will be returned.