How to read and write 16-bit sub_addr form I2C slave

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        I want to read and write a I2C slave,but the device has a sub-address of 16 bits,and the data is also 16 bits. Can anyone tell me how to do it.Because EZUSB_WriteI2C is for 8 bit.   
0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum!

   

Do not care for the data-width. As most interfaces are 8 bits wide, writing two 8-bit data will usually work. Try to get the information which byte to transfer first, MSB or LSB. What is the device you try to talk to? Link to datasheet appreciated 😉

   

 

   

Bob

View solution in original post

0 Likes
1 Reply
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum!

   

Do not care for the data-width. As most interfaces are 8 bits wide, writing two 8-bit data will usually work. Try to get the information which byte to transfer first, MSB or LSB. What is the device you try to talk to? Link to datasheet appreciated 😉

   

 

   

Bob

0 Likes