5.6.2 Write to EEData

EEData is written twice in this example: first to initialize values in EEData memory and second to change the data for dynamic display.

Writing to EEData takes more than one cycle, so a write-complete flag is used to determine when the write is done (PIR2bits.EEIF). The flag is cleared initially, as well as after each time the write completes (This flag must be cleared in software).