??? 10/12/06 15:25 Read: times |
#126321 - few questions ... Responding to: ???'s previous message |
Maniraj said : RSEG ?PR?_WriteFlashByte?FLASHA _WriteFlashByte: PUSH IE ; save interrupts CLR EA ; disable interrupts MOV A,CMOD MOV R2,A ; store copy of CMOD JNB ACC.6,?IAPTAG11 ; if watchdog enabled then disable ANL CMOD,#0BFH ?IAPTAG11: ORL AUXR1,#020H ; enable bootrom MOV R0,#20 ; osc frequency 20MHz MOV R1,#02H MOV DPH,R4 ; address to program MOV DPL,R5 MOV A,R7 ; data to write CALL 0FFF0H ; call iap routine MOV R7,A ; id in accumulator ANL AUXR1,#0DFH ; disable bootrom MOV CMOD,R2 ; restore CMOD (restore watchdog state) POP IE ; restore interrupts to initial state RET Dear Mani ... 1> In the above code you have use one statement MOV R0,#20 ; osc frequency 20MHz could you or any one please tell me whats this OSC frequency ... Is it internal or external in the circuit ... mine external OSC I m using is 12 MHz ... 2> you havent intialized FCF register anywhere ... Is it not necessary to make changes in this register. 3> what is softICE flag ??? ... there is no description os this flag in the data sheet. My questions may be very funny at your side, but I think you can understand that I am not aware of flash programming and so really need guidance from all of you. reagards AS |