下载

C Flash Drivers for the T89C51AC2 for Keil
Compilers
This application note describes C routines for Keil
®
compiler to perform In-application
Programming/Self programming according to the “T89C51AC2 UART Bootloader
Datasheet”.
The T89C51AC2 provides on-chip UART Bootloader which contains routines to per-
form In-Application Programming/Self Programming.
The routine may be called at one entry point but with varying values in global variables
to perform the following operations:
-Read/Write Flash and EEPROM memory
-Read/Write Device ID
-Block Erase
-Read/Write Configuration Byte
-Bootloader start
The Flash_api library provides a mean to perform all operations by making function
calls in C language. The Flash_api library provides a standard way to call these func-
tions in C language. It has been done for Keil C-compilers parameter conventions but
can be adapted for others. The library also provides Macros and pre-defined values to
ease certain operations.
80C51
Microcontrollers
Application
Note
Rev. 4315A–8051–11/03