71
CHAPTER 4 EEPROM
4.5 EEPROM Writing
Data writing to EEPROM is performed with the following procedure.
<1> Check that EWST (EEPROM write control register (EEWC) bit 1) is 0 (EEPROM writing is not in
progress).
<2> Set the write time with EWCS0 and EWCS1 (EEWC bits 4 and 5).
<3> Set EWE (EEWC bit 0) to 1 (EEPROM writing enabled).
<4> Execute write instruction.
If performing several write operations in succession, perform the next write operation after the current write
operation has been completed. The following methods can be used for write termination and time control.
(1) Method using write termination interrupt request (INTWE)
After writing 1 data, wait for generation of write termination interrupt request while processing other than write
is performed. When write termination interrupt request is generated, start next write operation.
(2) Method using write status flag (EWST)
Poll EWST (EEPROM write control register (EEWC) bit 1), and wait for EWST to become 0. When EWST becomes
0, start the next write operation.
4.6 EEPROM Control-Related Interrupt
EEPROM write termination interrupt request (INTWE) is generated from EEPROM.
INTWE is an interrupt request generated upon termination of EEPROM writing.
This interrupt request is generated when the time set with EWCS0 and EWCS1 (EEPROM write control register
(EEWC) bits 4 and 5) has elapsed.
When this interrupt request is generated, data writing to EEPROM is terminated, indicating that writing of the
next data is enabled.
Summary of Contents for mPD780973 Series
Page 2: ...2 MEMO ...
Page 66: ...66 MEMO ...
Page 98: ...98 MEMO ...
Page 138: ...138 MEMO ...
Page 164: ...164 MEMO ...
Page 182: ...182 MEMO ...
Page 204: ...204 MEMO ...
Page 244: ...244 MEMO ...
Page 262: ...262 MEMO ...
Page 278: ...278 MEMO ...
Page 290: ...290 MEMO ...