??? 01/03/10 20:13 Read: times |
#172157 - Have you told us everything? Responding to: ???'s previous message |
Avni Modi said:
Before P89v51rd2bn, we have used p89c51rd2bn and it worked perfectly.
but can't in p89v51rd2bn. I'm waiting for your reply. Because I want to store my password data #AAH at address 0100H. and this one will remain forever after switch off. Why not simply make this parameter a part of your code, already located at 0x0100? Surely you've considered that! DPL EQU 82H
DPH EQU 83H FCF EQU 0B1H ORG 0000H MOV DPTR,#TESTAREA2 LCALL E_RASE ; Routine to erase data at address 0100H MOV DPTR,#TESTAREA2 MOV A,#0AAH LCALL W_RITE ;Routine for to write data #0AAH at address 0100H MOV DPTR,#TESTAREA2 LCALL R_EAD ;Routine for to read data at address 0100H ORG 0100H TESTAREA2: DB 0,0 Why not simply change this to ORG 0100H TESTAREA2: DB 0AAH,00 ; "0xAA" password resides here ORG 03F00H
MOV 080H,#0FFH MOV 0A0H,#0FFH stop: MOV DPTR,#0100H ;Reading data at address 0100H CLR A MOVC A,@A+DPTR MOV 080H,A MOV 0A0H,#11111100B LCALL DELAY LCALL DELAY SJMP STOP E_RASE: PUSH 0A8H CLR 0AFH MOV R1,#08H ANL FCF,#0FCH ; enable boot sector LCALL 01FF0H ORL FCF,#001H ; enable boot sector POP 0A8H LCALL DELAY LCALL DELAY RET W_RITE: PUSH 0A8H CLR 0AFH MOV R1,#02H ANL FCF,#0FCH ; enable boot sector LCALL 01FF0H ORL FCF,#001H ; enable boot sector POP 0A8H LCALL DELAY LCALL DELAY RET R_EAD: PUSH 0A8H CLR 0AFH MOV R1,#03H ANL FCF,#0FCH ; enable boot sector LCALL 01FF0H ORL FCF,#001H ; enable boot sector POP 0A8H LCALL DELAY LCALL DELAY RET DELAY: MOV R5,#10 LD2: MOV R6,#100 LD1: MOV R7,#100 LD: DJNZ R7,LD DJNZ R6,LD1 DJNZ R5,LD2 RET END |
Topic | Author | Date |
P89V51RD2 IAP and ISP writeup | 01/01/70 00:00 | |
e-mail it to andy ayre | 01/01/70 00:00 | |
thanks for replay | 01/01/70 00:00 | |
once again readout data | 01/01/70 00:00 | |
I'll look at it tomorrow | 01/01/70 00:00 | |
case sensitive assembler | 01/01/70 00:00 | |
Read Data....from address | 01/01/70 00:00 | |
What kind of programmer? | 01/01/70 00:00 | |
never saw a chip that .. | 01/01/70 00:00 | |
Maybe not now ... | 01/01/70 00:00 | |
Before 2000h perfect working | 01/01/70 00:00 | |
no bootloader | 01/01/70 00:00 | |
Why at 0x0100? | 01/01/70 00:00 | |
p89v51rd2bn | 01/01/70 00:00 | |
Have you told us everything? | 01/01/70 00:00 | |
using IAP routine | 01/01/70 00:00 | |
I'd suggest you focus on the datasheet | 01/01/70 00:00 | |
datasheet | 01/01/70 00:00 | |
I love these replies | 01/01/70 00:00 | |
NXP practice | 01/01/70 00:00 | |
not in this case | 01/01/70 00:00 | |
Getting Solution | 01/01/70 00:00 | |
HUH???? | 01/01/70 00:00 | |
good response![]() | 01/01/70 00:00 | |
have you read my last two posts? | 01/01/70 00:00 |