audi0615 - 2021-03-09

Hello.

Is it possible to read or write to a specific register with I2C_Master read, write method?
i found following topics but still don't understand how to use.
https://forge.codesys.com/forge/talk/Runtime/thread/d34960a109/
https://forge.codesys.com/forge/talk/Runtime/thread/010acaa90c/

for example, Is it correct do as below to write byValue to byRegister?

usiAddress:=16#20
byRegister:=16#19
byValue:=16#3C

I2C_Master.write(usiAddress, ADR(byRegister),1);
I2C_Master.write(usiAddress, ADR(byValue),1);

 

Last edit: audi0615 2021-03-09