12 – alternate location, 13 – operation as a slave, 14 – gpio – Maxim Integrated DS4830A Optical Microcontroller User Manual

Page 89: Ds4830a user’s guide

Advertising
background image

DS4830A User’s Guide

89

10.1.12 – Alternate Location
The DS4830A has 3-Wire, SPI and I

2

C Master on the same pins and some application may need the I

2

C Master and

3-Wire or SPI interfaces. To support such applications, the DS4830A provides an I

2

C Master alternate location.

When I2CCN_M bit 12 is set to ‘1’, the DACPW4 and DACPW5 pins are used as I

2

C SDA and I

2

C SCL pins as I

2

C

Master alternate locations.

10.1.13 – Operation as a Slave
The DS4830A contains two I

2

C interfaces, the master (MSDA and MSCL) and slave (DS4830A SDA and SCL pins).

These are two totally separate blocks within the DS4830A. 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. The I

2

C Master can be used in

the slave mode and allows two user programmable slave addresses using I2CSLA_M and I2CSLA2_M slave
address register. The I2CSLA2_M can be enabled by setting ADD2EN bit in the I2CCN_S register. When I

2

C Master

Interface is used as the I

2

C slave mode, it does not have any TX Page or Receive FIFO which are available in the

I

2

C slave interface (Section 11) only.


10.1.14 – 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.

Advertising