how to acces different registers with simulink raspberry pi i2c master write
1 view (last 30 days)
Show older comments
Hi together i have a project were i want to acces different registers on one i2c slave divice. the device is setting a pwm-frequency. i'm using the simulink block in the raspberrypi hardware supportpackage "i2c master write". if i enable register acces, there is only a fix register adress i can choose. does anybody know ho to acces different registers or how to change the addres of the registers with only one i2c master write block? thanks for you help in advance. i'm using matlab 2017a
regards Fabi
0 Comments
Answers (2)
Vandana Ravichandran
on 12 Apr 2017
Refer to the following page on I2C Master Write for Raspberry Pi: https://www.mathworks.com/help/supportpkg/raspberrypi/ref/i2cmasterwrite.html?s_tid=gn_loc_drop
You are correct, you need enable register access, in order to write to a register on the slave device. The register address is set to 0 by default. Under "Slave register access" you need to enter the register address on the slave device that you need to write to. Please refer the sequence of steps under "I2C Register Read/Write" section of the following page:
0 Comments
Ali El-Saeed
on 18 Apr 2017
i can't find the i2c blocks in simulink even after installing the latest version of the support package !! i am using matlab 2016a . can anybody help me ?
See Also
Categories
Find more on Run on Target Hardware in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!