8051 code to transfer 10 bytes of data to external memory
Whenever u need to transfer data from/to external memory, MOVX is used. We use DPTR to save the external address which acts as a pointer to the address .I have generated the data to be transfered in program...The following ALP uses the same logic:
ORG 000h
MOV DPTR,#adrdress ;paste your external address
MOV A,#0h
MOV R0,#0Ah ;counter
loop: ADD A,#01h
MOVX @DPTR,A
DJNZ R0,loop ;decrement and jump if not zero
END
Thats it....if any mistakes found...correct them yourselves...XD
No comments: