How can I write an I2C simulink package for Tiva TM4C123G

4 views (last 30 days)
Hi everybody, I am building a simulink model for controlling elevator with TI board Tiva C TM4C123G. I have found this one: Embedded Coder Target for Energia, but what a pity, in this library there is no support for I2C bus communication. How can I write by myself an I2C package for supporting this TI Board? The other solution is by using S-function, in which exist the i2c.c file (the offical I2C C source code for board). Is this also a good idea? Actually I want to generate C code from the entire simulink model at the end. I don't know, if the second solution works or not. Thank you for your help.
  2 Comments
sajad rather
sajad rather on 6 Apr 2017
Hello Jijing Yan and Everyone
I am also trying to do the same with TIVA Launchpad.I want to do the basic I2C interface using ADXL_345 accelrometer. I followed a video for aurdino(https://www.youtube.com/watch?v=G5ql23PaC_Q) from youtube to do exactly same,In the video,he was doing it by creating an S.function using some files which are availabe within aurdino library(like twi.h & twi.c) but not for Tiva (Energia library).
Had you found any luck in doing So?
if anyone knows how to do it ,Kindly do the needful here
Regards
sajad Rather

Sign in to comment.

Answers (0)

Categories

Find more on Simulation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!