Author Topic: FTDI D2XX Programming  (Read 1961 times)

0 Members and 1 Guest are viewing this topic.

Offline rheb1026Topic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
FTDI D2XX Programming
« on: February 28, 2018, 05:42:19 pm »
I'm starting to use the D2XX drivers to communicate between an FPGA and the PC. For now I'm just tinkering around with using the D2XX drivers and an Adafruit FT232H board.

I've downloaded the latest D2XX drivers from the website and successfully included them in a Visual Studio project. I also downloaded the latest D2XX programmers manual.

When I use the function FT_SetBitMode(), Visual Studio shows the prototype as:

Code: [Select]
FT_STATUS FT_SetBitMode(FT_HANDLE ftHandle, UCHAR ucMask, UCHAR ucEnable);

but the programmers manual shows the prototype being:

Code: [Select]
FT_STATUS FT_SetBitmode (FT_HANDLE ftHandle, UCHAR ucMask, UCHAR ucMode)

Does anyone familiar with D2XX know whether these functions are the same and just named differently? The datasheets and manuals leave a lot to be desired...

For what it's worth I can successfully blink the two LEDs on the Adafruit board, but I did so in a sort of trial and error fashion

I guess this may be best emailed to FTDI support, but I'm hoping someone here may know
 


Offline rheb1026Topic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: FTDI D2XX Programming
« Reply #2 on: February 28, 2018, 06:39:18 pm »
Thanks very much for the links! I've taken a quick look at the first one and it looks like it will be very helpful
 

Offline mubes

  • Regular Contributor
  • *
  • Posts: 237
  • Country: gb
  • Do Not Boil
Re: FTDI D2XX Programming
« Reply #3 on: February 28, 2018, 06:50:58 pm »
You might want to take a look at libftdi, which is an open source alternative to their closed library. Although it doesn't help you given that you've got their chip on your board in my opinion FTDI are a company best avoided.  You can find the libftdi stuff at https://www.intra2net.com/en/developer/libftdi/ . Good luck.

DAVE
« Last Edit: February 28, 2018, 06:57:44 pm by mubes »
 

Offline rheb1026Topic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: FTDI D2XX Programming
« Reply #4 on: February 28, 2018, 07:22:27 pm »
Thanks, I did look into libftdi. I had a bit of trouble getting it to connect to the Adafruit board, but probably due to me using Linux in a VM. I'll have to try again on my home desktop where I have a native Linux installation.

Do you have a recommendation for another easy to use USB-FIFO IC? I looked briefly into the Cypress FX2, but it seems more complicated to set up than the FT232H, and I don't really want to have to learn another microcontroller in the process... the FPGA is still enough of a challenge for me.

I should probably just go and grab one of those cheapo FX2 boards on ebay and try for myself.

I don't currently have a custom board made, so am open to changing things. Right now prototyping is being done on a Digilent Nexys board
 

Offline AndersJ

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: se
Re: FTDI D2XX Programming
« Reply #5 on: February 28, 2018, 07:33:46 pm »
mubes, why do you say FTDI should be avoided?
"It should work"
R.N.Naidoo
 

Offline mubes

  • Regular Contributor
  • *
  • Posts: 237
  • Country: gb
  • Do Not Boil
Re: FTDI D2XX Programming
« Reply #6 on: February 28, 2018, 08:02:36 pm »
He he,

I wrote a slightly more rant-y reply and then deleted most of it, since it's just my personal opinion....however, since you asked; I don't like them whacking end users when its manufacturers who have been naughty ( https://hackaday.com/2016/02/01/ftdi-drivers-break-fake-chips-again/ ), they have a "We don't provide samples policy" (Which is no big deal, a lot of companies don't, but it makes it a pain to get things quickly when they're not in stock in distribution) and, my current irritation; I went to their stand three times over the past two days at Embedded World to talk to them about some design stuff, but on each occasion they were far too busy talking to each other to talk to customers. 

I'm sure they're lovely people and they've just got on my wrong side, and it really is just my opinion, which I believe I'm free to express,...but while it's my money to spend I'll make the choices where to spend it.

DAVE
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf