how to acces different registers with simulink raspberry pi i2c master write

4 views (last 30 days)
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

Answers (2)

Vandana Ravichandran
Vandana Ravichandran on 12 Apr 2017
Refer to the following page on I2C Master Write for Raspberry Pi:
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:

Ali El-Saeed
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 ?


Find more on Simulink Support Package for Raspberry Pi Hardware 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!