??? 03/01/08 20:43 Read: times |
#151739 - P89V51RD2 IAP |
I need to be able to write to the internal flash on my P89V51RD2. I am storing approixately 30 bytes of config data at location 0x7000. I have to be able to erase the block and rewrite the data.
I am having difficult erasing config data at block/sector 0x7000. I wrote the below function in keil but it does not work. I am pretty sure it is correct. I am not sure about mov r1, 0x08. The program does seem to cash freeze as it excutes PUBLIC _IAP_WRITE _code SEGMENT CODE RSEG _code FCF DATA 0B1H ; sfr AUXR1 DATA 0A2H org 6000h _IAP_WRITE: PUSH IE ;DISABLE INTERRUPTS CLR EA MOV DPH, 0X70 ; high address MOV DPL, 0X00 ; lower address MOV R1, 0X08 ; Cmd to erase block ANL FCF, #0FCh ; enable boot sector - CALL 01FF0H ;call to ISP_API ORL FCF, #001h ;swith back 2 user FLASH POP IE RET END |
Topic | Author | Date |
P89V51RD2 IAP | 01/01/70 00:00 | |
Sure But Not Sure.... | 01/01/70 00:00 | |
forget the p89v use at89C51rc2 | 01/01/70 00:00 | |
But did you try to fix your source? | 01/01/70 00:00 | |
this is a good reason | 01/01/70 00:00 | |
Still a mystery to me... | 01/01/70 00:00 | |
I see your point; yet... | 01/01/70 00:00 | |
small potatoes | 01/01/70 00:00 | |
Methinks you're looking in the wrong place! | 01/01/70 00:00 | |
Too quick to blame the tools? | 01/01/70 00:00 | |
not the issue![]() | 01/01/70 00:00 |