| ??? 09/11/03 09:53 Read: times |
#54533 - RE: AT89C51CC01 update Responding to: ???'s previous message |
Hi,
I use (A)T89C51CC01. There is no problem to write program flash if you are familiar with programming and hardware. First of all, you should read datasheets about boot-loader, its user API, In-System Programming and Flash Library. Search Atmel site for it. I cannot remember from where I obtain all these docs - if you need them then I can send it to you via e-mail. In short, built-in boot-loader has the user API for a lot of functions you may call from it. For example, to write program flash I use something like (sorry if a typpo somewhere - my routines is a bit different but hardly to understend then): ; ... MOV AUXR1,#0 ; DPTR0 MOV DPTR,#DEST_FLASH_ADDR ; target flash address MOV AUXR1,#1 ; DPTR1 MOV DPTR,#SRC_XRAM_ADDR ; source address in XRAM MOV A,#NUMBER_OF_BYTES ; size MOV R1,#9 ; API command: write code page MOV AUXR,#00001101b ; attach internal XRAM CALL SUB_API_BOOT_FLASH ; move bytes from XRAM to FLASH ; ... ; subroutine to call user API SUB_API_BOOT_FLASH: PUSH AR0 ; these regs may be affected PUSH AR2 ; with boot-loader routines CLR EA #ifdef _WATCHDOG_USED_ MOV WDTRST,#0x1E ; restart watchdog if used MOV WDTRST,#0xE1 #endif ORL AUXR1,#00100000b ; map boot-flash into F800...FFFF LCALL 0xFFF0 ; address of API_ENTRY_POINT MOV FCON,#0 ; reset flash control register ANL AUXR1,#11011111b ; unmap boot-flash #ifdef _WATCHDOG_USED_ MOV WDTRST,#0x1E ; restart watchdog if used MOV WDTRST,#0xE1 #endif SETB EA POP AR2 POP AR0 RET Good days! |
| Topic | Author | Date |
| AT89C51CC01 update | 01/01/70 00:00 | |
| RE: AT89C51CC01 update | 01/01/70 00:00 | |
| RE: AT89C51CC01 update | 01/01/70 00:00 | |
| RE: AT89C51CC01 update | 01/01/70 00:00 | |
| RE: AT89C51CC01 update | 01/01/70 00:00 | |
| RE: AT89C51CC01 update | 01/01/70 00:00 | |
| RE: AT89C51CC01 update | 01/01/70 00:00 | |
| RE: AT89C51CC01 update | 01/01/70 00:00 | |
| RE: AT89C51CC01 update | 01/01/70 00:00 | |
| RE: AT89C51CC01 update TO ALL | 01/01/70 00:00 | |
RE: AT89C51CC01 update TO ALL | 01/01/70 00:00 |



