FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  


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.

Topics - liquidair

Pages: [1]
Discussion - Software / How to use FT201X's GPIO with C#?
« on: December 24, 2019, 12:05:30 AM »

I'm having a really hard time getting the GPIO to work on the FT201X. I've downloaded everything FT-X related and read it many times, I've successfully added the FTD2XX_NET.dll to my project and am able to connect to the device. This is my first experience with FTDI products, however, what is tripping me up more than anything is the documentation.

For one, the D2XX Programmer's Guide is based on C/C++, which wouldn't be a big deal, except the C# functions don't match. For instance, where' GetBitMode? It must be GetPinStates?

Then, there's nothing on how to actually use the GPIO. I finally found it in AN_373 Bit-Bang Modes for the FT-X Series, and there's examples. Sweet. So I try a simple example where I set CBUS3 output high, and then listen for a connected uC to drive CBUS0 high as an input. Doesn't work.

I debug for an hour and find that it GetPinStates for whatever reason appears to display the 1's compliment of what I expect (0b111111110 vs 0b00000001). Then after trying ~pinStates, and debugging for another hour cause that's returning 0 for some reason, I notice Visual Studio tell me that FTDI.FT_BIT_MODES.FT_BIT_MODE_CBUS_BITBANG  is only for the FT232. There's no mention of this anywhere in the documentation, and nor is there any documentation on how to actually use the 4 CBUS pins.

But there should be, the FT201 datasheet pg 11 mentions "A separate application note, AN232R-01, available from FTDI website (www.ftdichip.com) describes in more detail how to use CBUS bit bang mode." Clicking on this takes you to a broken link, and searching the site turns up a document not for the FT201.

Could someone please point me to documentation on how to use the FT201's GPIO. A programming guide for the C# driver would be a plus too!

Thank you.

Pages: [1]