i2c slave issue

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Sir/Madam,

 

I am using SAME70 board as a master and configuring the i2c slave(FT201x). I am using the same70 example code of twih_master and sending the address from master side as 0x22 as mentioned in the data sheet of slave device but the slave device is not responding.Can u please tell me what address has to be sent to enable the slave device.

 

i have attached the document of slave device.

 

Thanks in advance.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

edit: NVM - I read the datasheet incorrectly.  The FT201x is a slave device on the I2C bus.

Last Edited: Wed. Jun 19, 2019 - 06:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Coming back to this, per the datasheet the default slave address for that chip is 0x22.  Remember that with I2C the address is 7 bits loaded into bits 7..1, not bits 6..0.  This means the address is left shifted one bit before loading into the 8-bit raw byte for the I2C transfer.  I've seen some drivers that handle the address shifting for the caller, and other drivers that require the caller to manage the address shift first.  A logic analyzer or multi-channel oscilloscope is your friend here.  Confirm the signal matches the I2C specs including timing.

 

The datasheet mentions a program FT_Prog to configure the chip via the USB side (see section 10.2.1).  It's worth downloading that program and playing with it to confirm the default I2C address of 0x22 has not been changed.

 

Another thing to try is using the "General Call" address of 0x00.  This chip will respond to that address, but it must be the only device on the bus.  Once it is working with address 0x00 move on to the device specific address.