Datasheet
ADE7116/ADE7156/ADE7166/ADE7169/ADE7566/ADE7569
Rev. B | Page 112 of 152
Erase All
Erase all of the 16 kB flash memory.
MOV FLSHKY,#3Bh ; Write Flash security
key.
MOV ECON,#03h ; Erase all
Read Byte
Read flash memory byte 0x3C00.
MOV EADRH,#3Ch ; Setup byte address
MOV EADRL,#00h
MOV FLSHKY,#3Bh ; Write Flash security
key.
MOV ECON,#04h ; Read Byte
; Data is ready in EDATA register
Erase Page and Write Byte
Erase the page containing flash memory byte 0x3C00 and then
write 0xF3 to that address. Note that the other 511 bytes in this
page are erased.
MOV EDATA,#F3h ; Data to be written
MOV EADRH,#3Ch ; Set up byte address
MOV EADRL,#00h
MOV FLSHKY,#3Bh ; Write flash security
key.
MOV ECON,#05h ; Erase page and then write
byte