STC8A8K64D4 Series Manual
MOV
MOVX
JMP
STOP:
MOV
MOV
MOVX
JMP
WAIT:
MOV
MOVX
JNB
ANL
MOVX
RET
DELAY:
MOV
MOV
DELAY1:
NOP
NOP
NOP
NOP
DJNZ
DJNZ
RET
MAIN:
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOVX
MOV
MOV
MOVX
CALL
MOV
CALL
CALL
MOV
CALL
DPTR,#I2CMSCR
@DPTR,A
WAIT
A,#00000110B
DPTR,#I2CMSCR
@DPTR,A
WAIT
DPTR,#I2CMSST
A,@DPTR
ACC.6,WAIT
A,#NOT 40H
@DPTR,A
R0,#0
R1,#0
R1,DELAY1
R0,DELAY1
SP, #5FH
P0M0, #00H
P0M1, #00H
P1M0, #00H
P1M1, #00H
P2M0, #00H
P2M1, #00H
P3M0, #00H
P3M1, #00H
P4M0, #00H
P4M1, #00H
P5M0, #00H
P5M1, #00H
P_SW2,#80H
A,#11100000B
DPTR,#I2CCFG
@DPTR,A
A,#00000000B
DPTR,#I2CMSST
@DPTR,A
START
A,#5AH
SENDDATA
RECVACK
A,#000H
SENDDATA
;Send STOP command
;Clear interrupt flag
;Set the I2C module as master mode
;Send start command
;Slave address is 5A
;Send device address (010_1101B) + write command (0b)
;Send storage address
- 626 -
Need help?
Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?