Datasheet
21
4266C–CAN–03/08
AT89C51CC03 UART Bootloader
API Commands
Several types of APIs are available:
• Read/Program Flash and EEPROM Data memory
• Read Configuration and Manufacturer Information
• Program Configuration Information
• Erase Flash
• Start bootloader
Read/Program Flash
and EEPROM Data
Memory
All routines to access EEPROM Data are managed directly from the application without using
bootloader resources.
To read the Flash memory the bootloader is not involved.
For more details on these routines see the AT89C51CC03 datasheet sections “Program/Code
Memory” and “EEPROM Data Memory”
Two routines are available to program the Flash:
– __api_wr_code_byte
– __api_wr_code_page
• The application program load the column latches of the Flash then call the
__api_wr_code_byte or __api_wr_code_page see datasheet in section “Program/Code
Memory
”.
• Parameter settings
• instruction: LCALL FFF0h.
Note: No special resources are used by the bootloader during this operation
Read Configuration
and Manufacturer
Information
• Parameter settings
API_name R1 DPTR0 DPTR1 Acc
__api_wr_code_byte 02h
Address in
Flash
memory to
write
- Value to write
__api_wr_code_page 09h
Address of
the first Byte
to program in
the Flash
memory
Address in
XRAM of the
first data to
program
Number of Byte
to program
API_name R1 DPTR0 DPTR1 Acc
__api_rd_HSB 0Bh 0000h x return HSB
__api_rd_BSB 07h 0001h x return BSB
__api_rd_SBV 07h 0002h x return SBV
__api_rd_SSB 07h 0000h x return SSB
__api_rd_EB 07h 0006h x return EB
__api_rd_manufacturer 00h 0000h x
return
manufacturer id
__api_rd_device_id1 00h 0001h x return id1