FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - Transformer-V

Pages: [1]
1
Discussion - Software / Re: FT232H Asynchronous Bit-Bang. Read data.
« on: February 09, 2022, 02:35:19 AM »
Hi,
Thanks for the information provided.

Is it possible to disable the write timeout using the function FT_SetTimeouts(ftHandle, 0, 0) by setting the value of the dwWriteTimeout parameter to zero.

In the function FT_SetDivisor(FT_HANDLE ftHandle, USHORT usDivisor) the usDivisor parameter range can be set from 0 to 65535?


2
Discussion - Software / Re: FT232H Asynchronous Bit-Bang. Read data.
« on: February 01, 2022, 03:36:33 AM »
Thanks!
I bring the code:

Code: [Select]
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

3
Discussion - Software / FT232H Asynchronous Bit-Bang. Read data.
« on: January 28, 2022, 05:00:35 PM »
Hello! :)
How to read AD bus data using the FT_Read(...) function in the  asynchronous bit-bang mode FT_BITMODE_ASYNC_BITBANG? :-\
Can I have a code example in C?

Pages: [1]