Datasheet
45
4337K–USB–04/08
AT89C5130A/31A-M
11. In-System Programming (ISP)
With the implementation of the User Space (FM0) and the Boot Space (FM1) in Flash technol-
ogy the AT89C5130A/31A-M allows the system engineer the development of applications with a
very high level of flexibility. This flexibility is based on the possibility to alter the customer pro-
gram at any stages of a product’s life:
• Before mounting the chip on the PCB, FM0 flash can be programmed with the application
code. FM1 is always preprogrammed by Atmel with a USB bootloader.
(1)
• Once the chip is mounted on the PCB, it can be programmed by serial mode via the USB
bus.
Note: 1. The user can also program his own bootloader in FM1.
This ISP allows code modification over the total lifetime of the product.
Besides the default Bootloaders Atmel provide customers all the needed Application-Program-
ming-Interfaces (API) which are needed for the ISP. The API are located in the Boot memory.
This allow the customer to have a full use of the 32-Kbyte user memory.
11.1 Flash Programming and Erasure
There are three methods for programming the Flash memory:
• The Atmel bootloader located in FM1 is activated by the application. Low level API routines
(located in FM1)will be used to program FM0. The interface used for serial downloading to
FM0 is the USB. API can be called also by user’s bootloader located in FM0 at [SBV]00h.
• A further method exist in activating the Atmel boot loader by hardware activation. See the
Section “Hardware Registers”.
• The FM0 can be programmed also by the parallel mode using a programmer.