Thanks!
I bring the code:
FT_HANDLE ftGlobalHandle;
FT_STATUS ftRet;
DWORD ftRxBufferLen,ftReadRetByte,ftWriteRetByte;
unsigned char RxBuffer[65536];
int TestBufferLen,Steeps;
unsigned char TestBuffer[20485760]; //20 MB
char Dig[10];
ftRet=FT_SetBitMode(ftGlobalHandle,0x00,FT_BITMODE_RESET); //Reset
if(ftRet!=FT_OK)
{
//Error
}
Sleep(50);
//ADBUS: MSB 0 0 0 0 - in 1 1 1 1 - out LSB
ftRet=FT_SetBitMode(ftGlobalHandle,0x0f,FT_BITMODE_ASYNC_BITBANG); //0x01 = Asynchronous Bit Bang
if(ftRet!=FT_OK)
{
//Error
}
TestBufferLen=0;
for(Steeps=0;Steeps<31744;Steeps++) //63488/2 = 31744 (65536 - ((65536/64)*2)) AN232B-03_D2XXDataThroughput
{
TestBuffer[TestBufferLen++]=0x0f;
TestBuffer[TestBufferLen++]=0x00;
}
ftWriteRetByte=0;
ftRet=FT_Write(ftGlobalHandle,TestBuffer,TestBufferLen,&ftWriteRetByte);
if(ftRet!=FT_OK)
{
//Error
}
do
{
ftRet=FT_GetQueueStatus(ftGlobalHandle,&ftRxBufferLen);
if(ftRet!=FT_OK)
{
//Error
}
wsprintfA(Dig,"RX_size=%d",ftRxBufferLen);
MessageBoxA(GetDesktopWindow(),Dig,"RX",MB_ICONINFORMATION);
}while(ftRxBufferLen!=65536);
ftRet=FT_Read(ftGlobalHandle,RxBuffer,ftRxBufferLen,&ftReadRetByte);
if(ftRet!=FT_OK)
{
//Error
}
After reading FT_Read(ftGlobalHandle,RxBuffer.... there will be only zeros in the RxBuffer buffer 0x00 0x00 ...
Did I understand correctly that when writing FT_Write(...) asynchronously to the ADBUS bus, the previous state of the ADBUS bus bit is not saved, and it will not be possible to read them using FT_Read(...) ?
When writing FT_Write(...) asynchronously, the past state of the ADBUS7...0 bus bits is not saved?
In FT_BITMODE_ASYNC_BITBANG (0x01) mode, we either write or read ?
Why FT_GetQueueStatus(ftGlobalHandle,&ftRxBufferLen); returns length ftRxBufferLen = 65536? When recorded 63488