Hello
Hope this is the right place to ask.
Problem: Using LibFT260 (form here:
https://ftdichip.com/products/ft260q/) we can successfully read from our slave device, but at an effective speed lower than the clock speed would allow. The issue is pauses in between frames:
X -> Byte + ACK
_ -> Clock held low by FT260 (Pause)
XX_X_X_X_X....
See attached images. The slave device is not clock stretching as it has a weak driver and it is clearly visible by the low level of the clock when that happens. The duration of the pause at 2Mbit clock is shorter than at 400kbit.
The pauses occur during read and write.
Questions:
- Is the FT260 capable of communicating without these pauses?
- If so, how, and can it be done with the dll provided in LibFT260?
Our software Engineer has provided c++ pseudo code to illustrate what he is doing:
##############################################################
FT260_HANDLE FFT260Handle;
FT260_STATUS status;
...
uint32 kbps = 400;
int dwBytesToWrite = 7;
uint8 writeBuffer[dwBytesToWrite] = (0x01, 0x81, 0x80, 0x00, 0x00, 0xA0, 0x15);
DWORD dwBytesToRead = 14;
uint8 deviceAddress = 0x60;
uint8 readBuffer[dwBytesToRead];
DWORD dwBytesReturned;
...
status = FT260_I2CMaster_Init(FFT260Handle, kbps);
if (status== FT260_OK)
{
status= FT260_I2CMaster_Write(FFT260Handle, deviceAddress,
FT260_I2C_START, writeBuffer, dwBytesToWrite, dwBytesWritten);
if (status== FT260_OK)
{
status= FT260_I2CMaster_Read(FFT260Handle, deviceAddress,
FT260_I2C_START_AND_STOP, readBuffer, dwBytesToRead, dwBytesReturned);
}
...
}
##############################################################