STC8A8K64D4 Series Manual
EEPROM is read by MOVC, the flash program memory (ROM) space must be added in addition to F000h. That is, the
DPTR must be set to F234h before the MOVC instruction can be used for reading.
Note: Because the erasing is performed in 512-byte units, the lower 9 bits of the target address set when performing
the erasing operation are meaningless. For example, if the target address is set to 0234H, 0200H, 0300H or 03FFH
when executing the erasing command, the final erasing operation is the same, and the 512 bytes of 0200H ~ 03FFH are
erased.
The size and access address of the internal EEPROM are different for different models. The size and address of
EEPROM of each model are listed in the table below.
Reading, writing, erasing in
IAP mode
[1]
: This is a special model. The EEPROM size of this model can be set by the user when downloading by the ISP,
as shown below:
Users can plan any EEPROM space in the entire FLASH space provided that the size does not exceed the FLASH
size according to their own needs. It should be noted that the EEPROM is always planned from the back to the front.
For example, the size of FLASH in STC8A8K64D4 is 64K. If user wants to allocate 4K of it as EEPROM, the
physical address of EEPROM is the last 4K of 64K, and the physical address is F000h ~ FFFFh. Of course, if the user
uses IAP to access, the target address still starts from 0000h and ends at 0FFFh. When using MOVC to read, the target
address is in the range from F000h to FFFFh.