12 – operation as a slave, 13 – gpio, Operation as a slave – Maxim Integrated DS4830 Optical Microcontroller User Manual
Page 84: Gpio, Ds4830 user’s guide

DS4830 User’s Guide
84
10.1.12
– Operation as a Slave
The DS4830 contains two I
2
C interfaces, the master (MSDA and MSCL) and slave (DS4830 SDA and SCL pins). These
are two totally separate blocks within the DS4830. However, both of the blocks are identical. Because of this, it is
possible to operate the master as a slave and also operate the slave as a master.
To operate the master (MSDA and MSCL) as a slave I
2
C interface, the I2CMST bit in I2CCN_M needs to be set to a 0.
When the master is operating as a slave, it will use the same registers (I2CCN_M, I2CST_M, etc) that it uses for master
operation. However, the bits in these registers will have different functionality, as described in the I
2
C Slave Interface
Section. The I2CCN_M.SMB_MOD bit only affects the interface when it is operating as a slave. See the I
2
C Slave
Interface section for details on initializing and using a slave I
2
C interface.
10.1.13
– GPIO
When the I
2
C master controller is disabled (I2CEN=0), the MSDA and MSCL pins can be used as GPIO pins. The MSDA
pin is mapped to GPIO port P1.0 and MSCL is mapped to GPIO port P1.1. When used as GPIO outputs, the MSDA and
MSCL pins are push pull outputs. See the General-Purpose I/O Section for more information on using MSDA and MSCL
as GPIO pins.