2 i2c example: master mode, receive, 3 i2c example: slave mode, receive, 11 .5 .2 i – Maxim Integrated MAXQ622 User Manual
Page 169: C example: master mode, receive -14, 11 .5 .3 i, C example: slave mode, receive -14, C example: master mode, receive, C example: slave mode, receive

MAXQ612/MAXQ622 User’s Guide
11-14
Maxim Integrated
11.5.2 I
2
C Example: Master Mode, Receive
I
2
C configured as master, receive from slave address 08h:
; Setup for Master Mode Receive
move I2CCN, #047h
; I2CEN = 1, I2CMST = 1, I2CMODE = 1, I2CSTART = 1
call wait_start
; Polling routine to wait for I2CSTART to clear
call wait_busy
; Polling routine to wait for I2CBUSY to clear
move I2CIE.2, #01h
; Enable Receive Ready Interrupt
move I2CBUF, #008h
; Slave address set to 08h
call wait_tx_complete ; Wait for transmit interrupt
call wait_rxbuf
; Wait for receive interrupt
;; Byte received in I2CBUF, clear I2C interrupt flag and wait for next interrupt
11.5.3 I
2
C Example: Slave Mode, Receive
I
2
C configured as slave with address 1Ah:
; Setup for Slave Mode Receive
move I2CSLA, #01ah
; I2C Slave Address = 01ah
move I2CCN, #0001h
; I2CEN = 1, I2CMST = 0, I2CMODE = 0, I2CSTART = 0
call wait_start
; Polling routine to wait for I2CSTART to be set, indicating
;
a
received
START
;; Check for address match
move ACC, I2CST
and #0020h
; Check for Address Match flag set
cmp #0020h
jump ne, no_match
; If address match bit not set, not for us, else:
move I2CIE.2, #01h
; Enable Receive Ready Interrupt
call wait_rxbuf
; Wait for a receive interrupt
;; Byte received in I2CBUF, clear I2C interrupt flag and wait for next interrupt