??? 01/02/08 18:14 Read: times |
#148926 - P89v51 POR (Power On Reset) Responding to: ???'s previous message |
There are two flash blocks block0 and block1 in the P89v51.
Block1 (8k) holds the flash bootloader and IAP call routines. Block0 (64k) holds your user code. (80c51 micro's execute from 0x0000) a) Activating the bootloader to progam the P89v51RD2 ====================================================== On POR the 1st 8k of block0 is swapped with block1... hence block1 bootloader code starts executing ... If NO UART commands are received, the 8k of block0 is swapped back in and your previous "use code" starts executing from 0x0000. Using some reset /UART hardware and Flashmagic.... you can get the P89v51 to accept UART commands to program the micro (see flashmagic user manual on in the P89v51 section). b) USING IAP Commands to "self-program" the P89v51 ==================================================== In C or Assembly - you can set set some registers to "swap" block1 back in to the 1st 8k (you should be outside the 8k 1st code boundary). Then in C or assembly - you can make function calls to the IAP to program sections of the 64k flash code space. ===> If your intent is to just reprogram the device then stick with option a) as option b) requires flash and code "self management". Joe |
Topic | Author | Date |
P89V51RD2 IAP | 01/01/70 00:00 | |
P89V51RD2 IAP | 01/01/70 00:00 | |
why | 01/01/70 00:00 | |
P89v51 POR (Power On Reset)![]() | 01/01/70 00:00 |