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

Author Topic: FT2232H How to create and work with two channels?  (Read 770 times)

Pereubu123

  • Newbie
  • *
  • Posts: 3
    • View Profile
FT2232H How to create and work with two channels?
« 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?
« Last Edit: September 28, 2018, 03:50:58 PM by Pereubu123 »
Logged

Timbo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: FT2232H How to create and work with two channels?
« Reply #1 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.
Logged

FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 261
    • View Profile
Re: FT2232H How to create and work with two channels?
« Reply #2 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








Logged