
www.ti.com
TCA9554 - I2C GPIO Expander
5 TCA9554 - I2C GPIO Expander
The TCA9554 GPIO expander is used to enable the DRV2605L device. Because the multi-driver board
has the ability to control up to 8 haptic drivers, the TCA9554 device is able to control the enable lines of
the DRV2605L device through I2C and free up GPIO pin space on the MSP430F5510 device for other
peripherals. The following pseudo code shows how the TCA9554 device is used as an output
configuration.
I2C_SetSlaveAddr(TCA9554_SLAVE_ADDR) //setslave address
I2C_WriteSingleByte(0x03, ~(bit_set_for_output)) //configure as output port
I2C_WriteSingleByte(0x01, output_bits) //output values
The TCA9554 device is configured completely through I2C commands. The expander must be configured
as an output port for the corresponding drivers (8 drivers). The output port command register is 0x03.
Each bit of the 8-bit value represents the 8 output ports of the device. A value of zero in each bit
corresponds to an output configuration. The variable, bit_set_for_output, has the respective bits set as
outputs. When the output port is configured, register 0x03 does not need to be accessed unless those
ports will be used as some other port function. After the ports are configured as outputs, a write command
to register 0x01 is used to set the value of the output to either 0 or 1. The default values for outputs are
initialized to 0. See the TCA9554 data sheet, SCPS233, for more information on the TCA9554 device.
5.1 I2C Register Value Examples
The following examples listed in Table 2 and Table 3 show exact I2C transactions with slave addresses,
registers, and values to enable one DRV2605L device and to enable three or more DRV2605L devices.
Table 2. TCA9554 I2C Transaction for Enabling driver 1
Slave Address (7-bit) Register Value Description
I2C Action
Configures IO expander for output port at
1 Write 0x20 0x03 0xFE channel 1
2 Write 0x20 0x01 0x01 Sends a high signal to output channel 1
Table 3. TCA9554 I2C Transaction for Enabling drivers 1, 4, 5, and 8
Slave Address (7-bit) Register Value Description
I2C Action
Configures IO expander for output port at
1 Write 0x20 0x03 0x66 channel 1, 4, 5, and (corresponds to drivers
1, 4, 5, 8).
Sends a high signal to output channel 1, 4,
2 Write 0x20 0x01 0x99 5, and (corresponds to drivers 1, 4, 5, 8).
6 TCA9548A - I2C Switch
The DRV2605LEVM-MD is designed for multi-driver applications. The TCA9548A I2C switch was used to
independently setup haptic drivers and play the waveforms simultaneously. The pseudo code listed in the
following code allows the user to verify proper operation of the I2C switch and communication with the
DRV2605L device.
I2C_SetSlaveAddr(TCA9548_SLAVE_ADDR) //setslave address
I2C_WriteSingleByte(driver_position) //channelselection
This code lists the sequence for how to command the TCA9548A I2C switch. Any combination of channels
can be selected. When the slave address of the TCA9548A device is set, a single byte is required to
initialize channel selection. No register address is needed to send the channel selection value, but if a
register input must be available for the I2C write function, use the data value as the register value because
the device will take the last byte sent to it.
9
SLOU400–November 2014 DRV2605L Multiple ERM, LRA Haptic Driver Kit
Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated