-
Notifications
You must be signed in to change notification settings - Fork 116
spec i2c read
Ken Sharp edited this page Dec 10, 2025
·
2 revisions
Read one or more bytes from the I2C bus.
VI takes address, timeout, returns byte array.
| I2C Read Command | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | Read one or more bytes from the I2C bus. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Size | 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| SoF : 0xFF | PACKET SIZE | PACKET NUM | CMD : 0x00E3 | CHANNEL | SLAVE ADDR | NUM BYTES | TIMEOUT | EOF CONFIG* | CHECKSUM | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SoF | Start of Frame. Always 0xFF. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PACKET SIZE | Packet Size In Bytes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PACKET NUM | The Current Packet Number. This value increments with each new packet or repeats for a multi packet command. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CMD | I2C Read Command. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CHANNEL | I2C channel to read from. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SLAVE ADDR | I2C slave address to read from. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NUM BYTES | Number of bytes to read from I2C bus. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TIMEOUT | Time to wait for data (ms). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EOF CONFIG* | End of frame configuration. 0x00 = Default 0x01 = Restart 0x02 = Restart No Stop 0x03 = No Stop | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CHECKSUM | Checksum. Computed by adding all of the bytes in the packet in U8 form ignoring rollover. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| I2C Read Response | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | LINX device's response to I2C Read Command | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Size | Variable | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format | 0 | 1 | 2 | 3 | 4 | 5 | 6 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| SoF : 0xFF | PACKET SIZE | PACKET NUM | STATUS | DATA | CHECKSUM | |||||||||||||||||||||||||||||||||||||||||||||||||||
| SoF | Start of Frame. Always 0xFF. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PACKET SIZE | Total packet size in bytes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PACKET NUM | The packet number of the packet that generated the response. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| STATUS | See Return Status section below. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DATA | Bytes read from I2C Channel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CHECKSUM | Checksum. Computed by adding all of the bytes in the packet in U8 form ignoring rollover. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Status | Description |
|---|---|
| 0x80 | Timeout occurred while waiting for I2C data. |
| 0x81 | EOF Config Not Supported <THIS STATUS DNE IN LINX 1.0, WILL BE ADDED IN 1.1> |
See Return Status for universal return statuses.
See Return Status for universal return statuses.