??? 02/22/06 23:22 Read: times Msg Score: -1 -1 Looks like homework |
#110548 - 89LPC952 FLASH PROGRAMMING |
Hi,
I have written the code to erase 64 bytes from 0440h to 0480h for 89LPC952. flash_Erase: MOV R7,#00 ; RAM POINTER MOV R3,#64 ; 64 BYTES TO BE ERASED MOV FMCON,#00H ; "LOAD" COMMAND MOV FMADRH,#04H; ADDRESS HIGH MOV FMADRL,#40H; ADDRESS LOW MOV A,R7 MOV R0,A LOAD_PAGE: MOV FMDATA,@R0 INC R0 DJNZ R3,LOAD_PAGE MOV FMCON,#68H; "ERASE" COMMAND FOR 89LPC952 MOV R7,FMCON ; TO READ STATUS MOV A,R7 ANL A,#0FH; CHECK THE STATUS OF FMCON JNZ BAD ; REGISTER AND IF ERASED IT IS ZERO CLR C RET BAD: SETB C ; SET THE CARRY REGISTER IF NOT RET ; ANY ERROR FOUND IN PROGRAMMING The above code seems to work fine for erasing the code memory from 0440h to 0480h.I am now trying to write a code to program the code memory from 0440h to 0480h with "32h"(all the 64 bytes with "32h").Please can anyone tell me how it is done. Thanks, Shruthi |
Topic | Author | Date |
89LPC952 FLASH PROGRAMMING | 01/01/70 00:00 | |
Notes on posting code | 01/01/70 00:00 | |
rewrritten code 89LPC952 IAP code | 01/01/70 00:00 | |
what more do you need | 01/01/70 00:00 | |
Not sufficient!!! | 01/01/70 00:00 | |
how did you not "see" that? | 01/01/70 00:00 | |
I have written the code.... | 01/01/70 00:00 | |
Looks to me like | 01/01/70 00:00 | |
I have written the code | 01/01/70 00:00 | |
How can writing a constant be "the next" | 01/01/70 00:00 | |
Oh I see... | 01/01/70 00:00 | |
Disreguard previous post | 01/01/70 00:00 | |
a hint | 01/01/70 00:00 | |
updated code for 89LPC952 IAP | 01/01/70 00:00 | |
The above correction ('ONE' should be '1 | 01/01/70 00:00 | |
Ok... | 01/01/70 00:00 | |
That's exactly my question | 01/01/70 00:00 | |
How about.... | 01/01/70 00:00 | |
Thanks it worked!! | 01/01/70 00:00 | |
You're welcome![]() | 01/01/70 00:00 | |
Neat | 01/01/70 00:00 | |
If we go there, then | 01/01/70 00:00 |