I2C Transmit Block Description
This block supports the I2C peripheral interface in Transmit mode. It is used to directly transmit a data stream from the microcontroller (acting as Master) to a peripheral device (Slave). The block generates a START signal, sends the device address, and then transmits the data provided to the block input, ending the sequence with a STOP signal.

Table of Contents
Inputs
| Input Name | Type | Description |
|---|---|---|
| TX Data | uint8[ ] | Data to be transmitted via the I2C interface. The size of the input depends on the value of the Transmit size parameter. |
Outputs
| Output Name | Type | Description |
|---|---|---|
| Status | uint8 | Transmission status. Returns:1 transmission successful0 transmission failed |
Block Parameters
| Parameter | Description |
|---|---|
| I2C Number | I2C module number (for a single MCU I2C, this should be set to 0) |
| Slave address | Address of the slave device |
| Mode | Block operating mode |
| Transmit size | Size of the data to be transmitted. Determines the amount of data read from the TX Data input. |
| Timeout | How long the system will wait for the block execution |
| Sample time [s] | Function refresh rate |

CubeMX Configuration for a Given MCU
The configuration for the interface can be found on the subpage CubeMX Configuration for a Given MCU.
See also
Last updated on