Datasheet

38
4337K–USB–04/08
AT89C5130A/31A-M
9. Flash EEPROM Memory
9.1 General Description
The Flash memory increases EPROM functionality with in-circuit electrical erasure and program-
ming. It contains 16/32 Kbytes of program memory organized in 128/256 pages of 128 bytes,
respectively. This memory is both parallel and serial In-System Programmable (ISP). ISP allows
devices to alter their own program memory in the actual end product under software control. A
default serial loader (bootloader) program allows ISP of the Flash.
The programming does not require 12V external programming voltage. The necessary high pro-
gramming voltage is generated on-chip using the standard V
CC
pins of the microcontroller.
9.2 Features
Flash EEPROM internal program memory.
Boot vector allows user-provided Flash loader code to reside anywhere in the Flash memory
space. This configuration provides flexibility to the user.
Default loader in Boot EEPROM allows programming via the serial port without the need of a
user provided loader.
Up to 64K bytes external program memory if the internal program memory is disabled (EA =
0).
Programming and erase voltage with standard power supply.
Read/Program/Erase:
Byte-wise read (without wait state).
Byte or page erase and programming (10 ms).
Typical programming time (32 Kbytes) in 4.5 sec.
Parallel programming with 87C51 compatible hardware interface to programmer.
Programmable security for the code in the Flash.
100K write cycles for code memory
1K write cycles for configuration bits (BLJB, X2, OSCON1, OSCON0)
10 years data retention
9.3 Flash Programming and Erasure
The 16/32 Kbytes Flash is programmed by bytes or by pages of 128 bytes. It is not necessary to
erase a byte or a page before programming. The programming of a byte or a page includes a
self erase before programming.
There are three methods of programming the Flash memory:
1. The on-chip ISP bootloader may be invoked which will use low level routines to pro-
gram the pages. The interface used for serial downloading of Flash is the USB.
2. The Flash may be programmed or erased in the end-user application by calling low-
level routines through a common entry point in the Boot Flash.
3. The Flash may be programmed using the parallel method.
The bootloader and the Application Programming Interface (API) routines are located in the
Flash Bootloader.