C2000 LAUNCHXL-F28379D: SIMULINK I2C BLOCK
조회 수: 8 (최근 30일)
이전 댓글 표시
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".
댓글 수: 1
Shubham
2024년 9월 18일
Hello
what resolution did you get for this i am also facing similar kind of issues with I2C transmit block.
Please let me know at shubham.sharma4@ge.com
답변 (1개)
Aditya Padmanabha
2017년 8월 30일
Hi Jed,
Did you look at the updated I2C examples shipped in R2017a http://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/examples/using-the-i2c-bus-to-access-sensors.html?
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!