SUB-20 I2C 10-bit address support

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

SUB-20 I2C 10-bit address support

Post by xol »

SUB-20 I2C Master can support 10-bit I2C address mode. Let's see how.
  • Master-transmitter transmits to slave-receiver with a 10-bit slave address.
  • Transaction format [attachment=1]i2.jpg[/attachment] To generate such transaction you can run [code] /* Address Slave 0x355 */ #define SLAVE_ADDR_BITS98 0x03 #define SLAVE_ADDR_BITS70 0x55 rc = sub_i2c_write( hndl, 0xF8|SLAVE_ADDR_BITS98, SLAVE_ADDR_BITS70, 1, buf, BUF_SZ ); [/code]
  • Master-receiver reads slave-transmitter with a 10-bit slave address.
  • Transaction format [attachment=0]i22.jpg[/attachment] To generate such transaction you can run [code] /* Address Slave 0x355 */ #define SLAVE_ADDR_BITS98 0x03 #define SLAVE_ADDR_BITS70 0x55 rc = sub_i2c_read( hndl, 0xF8|SLAVE_ADDR_BITS98, SLAVE_ADDR_BITS70, 1, buf, BUF_SZ ); [/code]
See also:
sub_i2c_write
sub_i2c_read
Attachments
i22.jpg
i22.jpg (13.63 KiB) Viewed 5148 times
i2.jpg
i2.jpg (11.26 KiB) Viewed 5148 times

Post Reply