Skip to Main Content Skip to Search
Product Documentation

C280x/C2802x/C2803x/C28x3x/C2834x I2C Receive - Configure inter-integrated circuit (I2C) module to receive data from I2C bus

Library

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C2802x

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C2803x

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C280x

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C28x3x

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C2834x

Description

Configure the I2C module to receive data from the two-wire I2C serial bus.

Dialog Box

Addressing format

The I2C receive block supports the 7–Bit addressing, 10–Bit addressing, and Free data format. The default setting is 7–Bit addressing.

Slave address source

Select the method for setting the slave address register of the I2C slave. Selecting Specify via dialog displays Slave address register parameter. Selecting Input port enables definition of the address register via the input port. The default setting is Specify via dialog.

Slave address register

When you select Specify via dialog, enter a value for the Slave address register. The default value is 80. This field takes a decimal value.

Bit Count

Set the bit count to 1 through 8. The default setting is 8.

Read data length

Set the length of the read data. The default value is 1.

Initial output

Set the value the I2C node outputs to the model before it has received any data.

The default value is 0.

NACK bit generation

Select this parameter to generate a no-acknowledge bit (NACK) during the I2C acknowledge cycle and ignore new bits from the transmitting I2C node. The default setting is disabled (not selected).

Enable stop condition

Enable the I2C Receive Block in master mode to send a STOP message to the I2C Transmit block while it is in slave mode. The default setting is disabled (not selected).

Output receiving status

Selecting this parameter creates a status output that indicates when the I2C receive block is receiving a message. The default setting is disabled (not selected).

Sample time

Set the sample time for the block's input sampling. To execute this block asynchronously, set Sample Time to -1, and refer to Asynchronous Interrupt Processing for a discussion of block placement and other necessary settings. The default value is 0.001.

Data type

Type of data in the data vector. The length of the vector for the received message is at most 8 bytes. If the message is less than 8 bytes, the data buffer bytes are right-aligned in the output. You can set this parameter to int8, uint8, int16, uint16, int32, or uint32. The default setting is int8.

References

For detailed information on the I2C module, see:

See Also

C280x/C2802x/C2803x/C28x3x/C2834x I2C Transmit

I2C

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS