FTDI Community

General Category => Discussion - Software => Topic started by: Pereubu123 on September 28, 2018, 03:01:45 PM

Title: FT2232H How to create and work with two channels?
Post by: Pereubu123 on September 28, 2018, 03:01:45 PM
In the documentation: "..
each channel would be opened with a different instance
and ... Open: 
ftStatus = myFtdiDeviceCHA.OpenByIndex(0);
ftStatus = myFtdiDeviceCHB.OpenByIndex(1);
..."


The question is how to open two instances:

FTDI myFtdiDeviceCHB = new FTDI();
ftStatus = myFtdiDeviceCHB.OpenByIndex(1);

I am writing in C#.
From there I should  access BDBUS and BCBUS...

But I could not access B channel?
Have I done something wrong?
Title: Re: FT2232H How to create and work with two channels?
Post by: Timbo on January 25, 2019, 12:36:20 AM
In the documentation: "..
each channel would be opened with a different instance
and ... Open: 
ftStatus = myFtdiDeviceCHA.OpenByIndex(0);
ftStatus = myFtdiDeviceCHB.OpenByIndex(1);
..."


The question is how to open two instances:

FTDI myFtdiDeviceCHB = new FTDI();
ftStatus = myFtdiDeviceCHB.OpenByIndex(1);

I am writing in C#.
From there I should  access BDBUS and BCBUS...

But I could not access B channel?
Have I done something wrong?

Did you ever resolve this? I am in same boat, now.
Title: Re: FT2232H How to create and work with two channels?
Post by: FTDI Community on January 28, 2019, 01:18:45 PM
Hello,

If you use multiple channels, ensure to have an instance for each and you can then open and use them as shown below:

Code: [Select]
FTDI myFtdiDeviceCHA = new FTDI();
FTDI myFtdiDeviceCHB = new FTDI();
...
...
ftStatus = myFtdiDeviceCHA.OpenByDescription("FT2232H A");  // assuming EEPROM description is "FT2232H"
ftStatus = myFtdiDeviceCHB.OpenByDescription("FT2232H B");  // assuming EEPROM description is "FT2232H"
...
...
ftStatus = myFtdiDeviceCHA.Write(buffer, NumBytesToSend, ref NumBytesSent);
ftStatus = myFtdiDeviceCHB.Write(buffer, NumBytesToSend, ref NumBytesSent);

Best Regards, FTDI Community