two ft245am

Buongiorno,

I am working with _TWO_ devices FT245AM based, EEProm, FTD2XX.DLL V.1.06.06, WinMe or WinXP. SerialNumber is made different for the two devices. One device at time works fine, and is correctly listed with function FT_ListDevices(). Two devices together do not work. FT_ListDevices() count two devices, correctly list one of them, and return FT_INVALID_HANDLE for the other one.

The problem is only with FT245AM, with FT245BM the _TWO_ devices seem to work together fine.

Is that a known behavior? What my be wrong? What can I do?

Thanks.

lucky

Reply to
lucky
Loading thread data ...

Why don't you ask this to the support engineer(s) at FTDI? They are always very helpful.

Meindert

Reply to
Meindert Sprang

Are you sure that the error is FT_INVALID_HANDLE?

pinco_pallo

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Reply to
Pinco Pallo

I have posted the question to the FTDI support. But my previous experience is of no answer from the FTDI support.

Thanks.

lucky

Reply to
lucky

Buongiorno.

Or in other way, does anybody have used _TWO_ devices FT245AM based, EEProm, FTD2XX.DLL, with success? Please a little of details. Thanks.

lucky

Reply to
lucky

Yes. FT_ListDevices returns FT_INVALID_HANDLE for DevId=0, FT_OK for DevId=1, FT_DEVICE_NOT_FOUND for others DevId. Note that is the first device that become wrong connecting the second one. Before the connection of second device, the first one was OK.

lucky

Reply to
lucky

Have you programmed the EEPROMs so that the two devices have different serial numbers? I have used several FT245AMs with a hub without problems after they have been individually programmed with different serial numbers so that the hub and host can distinguish between the two. I also programmed the devices with different product IDs---but retained the FTDI manufacturer ID. (You can contact FTDI and they will issue you a range of Product IDs that you can use with your own products.)

Mark Borgerson

Reply to
Mark Borgerson

Yes. And I can see the different device SerialNumber, with FT_ListDevices(), when I connect one device at time.

With FTD2XX.dll or as VirtualCom? I am using FTD2XX.dll.

PID=0403h, VID=6001h for both devices. Or you are saying that VID _MUST_ be different?

Thanks.

lucky

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Reply to
lucky

I am using the direct FTD2XXX.dll drivers.

Are you sure that you don't have those backwards? My unit use VID 0403, which is the FTDI vendor ID.

I use PID FED9, where FTDI allocated me FED8 to FEDF (I think).

Here's the code I use to enumerate the connected devices:

***************** Borland C++ Builder code *******************

void __fastcall TFormLink::BTFindClick(TObject *Sender) { char devstring[30]; DWORD numdevs, devindex = 0; FT_STATUS fts; // if we have an open device, close it before listing devices if(FTH != 0) { // FTH is a global device handle FT_Close(FTH); FTH = 0; } fts = FT_ListDevices( &numdevs, NULL, FT_LIST_NUMBER_ONLY); CBUSB->Items->Clear(); // clear the list in the GUI fts = FT_OK; if(numdevs > 0){ for(devindex = 0; devindex < numdevs; devindex++){ fts = FT_ListDevices( (PVOID)devindex, devstring, FT_LIST_BY_INDEX |FT_OPEN_BY_SERIAL_NUMBER ); //if the result is good, add device in GUI if(fts == FT_OK) CBUSB->Items->Add((const char *)devstring); } } else{ strcpy(devstring, "No USB-1 Found" ); CBUSB->Items->Strings[0] = (const char *)devstring; } CBUSB->ItemIndex = 0; }

Here's the code I use to open the device----picked from a list by serial number:

void __fastcall TFormLink::BTOpenClick(TObject *Sender) { // try to find and open a CF-1 interface

char devstring[30]; long numdevs; long devindex = 0; if(FTH != 0) { FT_Close(FTH); FTH = 0; } fts = FT_ListDevices( &numdevs, NULL, FT_LIST_NUMBER_ONLY);

if(numdevs >0) { devindex = CBUSB->ItemIndex; // get item selector from GUI // get the serial number from the GUI string if(devindex >=0)strcpy(devstring, CBUSB->Items->Strings[CBUSB-> ItemIndex].c_str()); fts = FT_OpenEx((PVOID)devstring, (DWORD)FT_OPEN_BY_SERIAL_NUMBER, &FTH);

}

if(fts == FT_OK){ FT_ResetDevice(FTH); FT_SetTimeouts(FTH, 300,300); }

}

Mark Borgerson

Reply to
Mark Borgerson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.