libftdi Archives

Subject: I2C Read Problem

From: Nick Teo <gt224@xxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 22 Oct 2013 14:52:44 -0400
Hi all,

I'm working on some code right now for the FT2232H chip to read registers on another IC using I2C. First I send a start command, a write command (containing the slave write address and start register) and then a stop command. I then build a buffer that contains the start command, then write command (for the slave read address), then a read command, and a stop command.

When I send the buffer over to the FT2232H chip, I don't get any intelligible output back from it when I read it. However, when I send the start and write command and then usleep for 10 millisecond and then send the read command and stop, I get what I expected to get back.

I think this might be due to the lack of clock stretching support (correct me if I'm wrong). Is there a way to get around this problem? I was hoping to queue a bunch of these buffers in the FT2232H's buffer and then whenever it receives an interrupt from the other IC, it would read it and store the data in its RX buffer. This would allow me to poll the FT2232H chip every 10 milliseconds or so to collect all the information that has been collected since the last poll. Any help would be greatly appreciated.

Thanks,
Nick


libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx


Current Thread
  • I2C Read Problem, Nick Teo <=