Flash eeprom memory, General description, Features – Rainbow Electronics AT89C5131 User Manual
Page 35: Flash programming and erasure

35
AT89C5131
4136A–USB–03/03
Flash EEPROM Memory
General Description
The Flash memory increases EPROM functionality with in-circuit electrical erasure and
programming. It contains 32 Kbytes of program memory organized in 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 programming voltage is generated on-chip using the standard V
CC
pins of the
microcontroller.
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 5V or 3.3V V
CC
supply.
•
Read/Program/Erase:
•
Byte-wise read (without wait state).
•
Byte or page erase and programming (10 ms).
•
Typical programming time (32 Kbytes) in 10 sec.
•
Parallel programming with 87C51 compatible hardware interface to programmer.
•
Programmable security for the code in the Flash.
•
100K write cycles
•
10 years data retention
Flash Programming and
Erasure
The 32 Kbytes Flash is programmed by bytes or by pages of 128 bytes. It is not neces-
sary 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
program the pages. The interface used for serial downloading of Flash is the
UART.
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 ROM.
3.
The Flash may be programmed using the parallel method by using a conven-
tional EPROM programmer. The parallel programming method used by these
devices is similar to that used by EPROM 87C51 but it is not identical and the
commercially available programmers need to have support for the AT89C5131.
The bootloader and the Application Programming Interface (API) routines are located in
the Boot ROM.