Download Print this page

STC micro STC8A8K64D4 Series Reference Manual page 622

Advertisement

STC8A8K64D4 Series Manual
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOVX
MOV
MOV
MOVX
CALL
MOV
CALL
CALL
MOV
CALL
CALL
MOV
CALL
CALL
MOV
CALL
CALL
MOV
CALL
CALL
CALL
CALL
CALL
MOV
CALL
CALL
MOV
CALL
CALL
MOV
CALL
CALL
CALL
MOV
CALL
CALL
CALL
MOV
CALL
CALL
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,#0A0H
SENDDATA
RECVACK
A,#000H
SENDDATA
RECVACK
A,#000H
SENDDATA
RECVACK
A,#12H
SENDDATA
RECVACK
A,#78H
SENDDATA
RECVACK
STOP
DELAY
START
A,#0A0H
SENDDATA
RECVACK
A,#000H
SENDDATA
RECVACK
A,#000H
SENDDATA
RECVACK
START
A,#0A1H
SENDDATA
RECVACK
RECVDATA
P0,A
SENDACK
RECVDATA
;Set the I2C module as master mode
;Send start command
;Send device address + write command
;Send storage address high byte
;Send storage address low byte
;Write test data 1
;Write test data 2
;Send stop command
;Waiting for the device to write data
;Send start command
;Send device address + write command
;Send storage address high byte
;Send storage address low byte
;Send start command
;Send device address + read command
;Read data 1
;Read data 2
- 606 -

Advertisement

loading
Need help?

Need help?

Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?

This manual is also suitable for:

Micro stc8a8k64d4-64pinMicro stc8a8k64d4-48pin