MATLAB Answers

C2000 LAUNCHXL-F28379D: SIMULINK I2C BLOCK

12 views (last 30 days)
Jed
Jed on 14 Jun 2017
Answered: Aditya Padmanabha on 30 Aug 2017
Settings: master mode and internal clock at 10mhz,
Does the Simulink block generate a "Stop" signal at the end of each transmission? Do i need to tick the "Enable Stop condition" to generate the "Stop" signal at the end of the transmission?
Also, how do i generate a "repeated start condition (Sr)" for i2c read access and only to transmit the "Stop" signal after receiving the expected number of data from the slave?
Can it be done by having connecting a register address to the i2c transmit block and an i2c receive block, with the number of expected receive data written in "Read data Length"? Note that i do not want to send a "Stop" signal before the "repeated start signal".

  0 Comments

Sign in to comment.

Answers (1)

Aditya Padmanabha
Aditya Padmanabha on 30 Aug 2017
Hi Jed,
In the example, there are models which perform read and write using I2C from EEPROM and sensors like accelerometer and gyroscope. In the examples the repeated read from slave is done and the stop signal is sent after reading the required amount of data.
Thanks,
Aditya

  0 Comments

Sign in to comment.


Translated by