I2c device read/write – IBASE IBD185 User Manual

Page 18

Advertising
background image

18 IBD185 User Guide


I2C Device Read/Write

The two interfaces are providing generic command format for I2C bus

read/write operation.

The generic command format of an I2C operation can be shown below:

BudID SlvAdd CmdLen CmdCode

Flag DatLen DatBuff

Bud ID

1:I2C1

2:I2C2

(7bits

SADD

<<1)

Length of

CmdCode

Command

code

0:Normal

1:Block

Length of

DatBuff

Data

bytes

Limitation:

The max length of command code limits in 8 bytes.

The max length of data byte limits in 32 bytes.

The generic command can be varied to several types of I2C read/write

operations. Such as Byte Write/Byte Read, Word Write/Word Read,

Sequential Write/Sequential Read, and Block Write/Block Read.

Stuff the command interface with proper arguments to perform different

kinds of I2C read/write depends on your needs.

Please refer to the user’s manual of your I2C slave device to transmit the

I2C command in correct format.

Advertising