Using FTDI USB devices
Using FTDI USB devices
Hi,
I am developing a USB interface using a chip from FTDI, a DLL provided by FTDI and PB to control it all. So far progress is OK, I have the DLL started and can interrogate the chip to get its ID etc. Next step is to use the W32_API look-alike functions provided by FTDI to open/read-write/close files etc.
My target is transfer data at 1MByte/second into the PC, which is possible with a co-operative sender, in my case a massive Altera FPGA so it should work.
I just wondered if anyone else has taken this route or something similar so we could share experiences.
I've posted this in "beginners" as well, it is not really a topic for beginners but I think everyone reads that area first!
I am developing a USB interface using a chip from FTDI, a DLL provided by FTDI and PB to control it all. So far progress is OK, I have the DLL started and can interrogate the chip to get its ID etc. Next step is to use the W32_API look-alike functions provided by FTDI to open/read-write/close files etc.
My target is transfer data at 1MByte/second into the PC, which is possible with a co-operative sender, in my case a massive Altera FPGA so it should work.
I just wondered if anyone else has taken this route or something similar so we could share experiences.
I've posted this in "beginners" as well, it is not really a topic for beginners but I think everyone reads that area first!
- SimpleMind
- Enthusiast
- Posts: 112
- Joined: Sun May 18, 2003 12:40 pm
- Location: Netherlands
The current USB project is an interface that is part of a 'data concentrator' that collects vehicle performance data via a radio link and stores the data on a Multimedia card. Later, the data is collected by a guy with a laptop computer; using a USB interface.
We used the FTDI device because the PC drivers etc are free and there are worked examples from the supplier's web-site. Also, there is an evaluation board available to take your first steps with.
Consider the system as three parts, a pump, a pipe and a receiver. The data source is the data concentrator unit, which 'pumps' the data onto the USB 'pipe' where it is then received by the PC 'receiver'.
The receiver software took some time to get right, most of which was spent understanding the terse documentation. The DLL suplied by FTDI was easy to use and PuerBasic had no problems with it.
A test 'pump', which was software only (running on an Renasas H-8), could send data at over 600KBytes / sec; limited by the H8 clock.
A real pump, using the same processor, but recovering the data from the MMC and servicing other parst of the system dropped the rate to just 100kBytes / sec. However, this involved software bit-banging the FTDI interface which is tragically slow! The next step is to transfer the FTDI interface into hardware which will increase the rate by a very significant amount. Finally the data flow MMC=> FTDI will be all hardware and we will get the highest speed.
The FTDI device we are using provides two channels, one is used for the data transfer, as described, and the other is configured as a RS232 interface to allow the PC to talk to the H8 for setup, command and debug.
We also have another project that uses the same technolgy in a minimalist oscilloscope module. That project is on hold waiting the next hardware iteration, but is progressing well. In this case Pure BASIC is running two analogue displays, 16 digital channels and a high performance FFT with separate display window etc. I'm getting many screen refreshes a second. Great fun!
We used the FTDI device because the PC drivers etc are free and there are worked examples from the supplier's web-site. Also, there is an evaluation board available to take your first steps with.
Consider the system as three parts, a pump, a pipe and a receiver. The data source is the data concentrator unit, which 'pumps' the data onto the USB 'pipe' where it is then received by the PC 'receiver'.
The receiver software took some time to get right, most of which was spent understanding the terse documentation. The DLL suplied by FTDI was easy to use and PuerBasic had no problems with it.
A test 'pump', which was software only (running on an Renasas H-8), could send data at over 600KBytes / sec; limited by the H8 clock.
A real pump, using the same processor, but recovering the data from the MMC and servicing other parst of the system dropped the rate to just 100kBytes / sec. However, this involved software bit-banging the FTDI interface which is tragically slow! The next step is to transfer the FTDI interface into hardware which will increase the rate by a very significant amount. Finally the data flow MMC=> FTDI will be all hardware and we will get the highest speed.
The FTDI device we are using provides two channels, one is used for the data transfer, as described, and the other is configured as a RS232 interface to allow the PC to talk to the H8 for setup, command and debug.
We also have another project that uses the same technolgy in a minimalist oscilloscope module. That project is on hold waiting the next hardware iteration, but is progressing well. In this case Pure BASIC is running two analogue displays, 16 digital channels and a high performance FFT with separate display window etc. I'm getting many screen refreshes a second. Great fun!
- SimpleMind
- Enthusiast
- Posts: 112
- Joined: Sun May 18, 2003 12:40 pm
- Location: Netherlands
Thanks for the update RichardL!
I'm interested in the FTDI stuff because I've a Parallax BS2 module with an FTDI chip. Parallax changed a serial board into an USB version with a serial to USB driver and on the board a hardware piece that translates USB into serial Tx and Rx signals.
In that way they didn't have to change their software. The FDTI drivers and chip did the nasty work.
Further more I'm interested in a simpler way of using USB driver code. Until now it is far too complex to use it in a simple way.
I think that FTDI has made a nice solution by supplying virtual serial drivers for the USB. I think it can be used for far more USB devices than just the serial/USB chip.
Regards,
Marcel
I'm interested in the FTDI stuff because I've a Parallax BS2 module with an FTDI chip. Parallax changed a serial board into an USB version with a serial to USB driver and on the board a hardware piece that translates USB into serial Tx and Rx signals.
In that way they didn't have to change their software. The FDTI drivers and chip did the nasty work.
Further more I'm interested in a simpler way of using USB driver code. Until now it is far too complex to use it in a simple way.
I think that FTDI has made a nice solution by supplying virtual serial drivers for the USB. I think it can be used for far more USB devices than just the serial/USB chip.
Regards,
Marcel
Give me books, fruit, french wine, fine weather and a little music.
John Keats
John Keats
- SimpleMind
- Enthusiast
- Posts: 112
- Joined: Sun May 18, 2003 12:40 pm
- Location: Netherlands
- SimpleMind
- Enthusiast
- Posts: 112
- Joined: Sun May 18, 2003 12:40 pm
- Location: Netherlands
- SimpleMind
- Enthusiast
- Posts: 112
- Joined: Sun May 18, 2003 12:40 pm
- Location: Netherlands
- SimpleMind
- Enthusiast
- Posts: 112
- Joined: Sun May 18, 2003 12:40 pm
- Location: Netherlands
- SimpleMind
- Enthusiast
- Posts: 112
- Joined: Sun May 18, 2003 12:40 pm
- Location: Netherlands
A while ago I bought the book USB Complete, third edition from Jane Axelson. If you search for this book with filetype:pdf on google you will find both editions. 
Very good book with C++ /VB.NET examples. The second edition has C++/VB6 examples.

Very good book with C++ /VB.NET examples. The second edition has C++/VB6 examples.
Give me books, fruit, french wine, fine weather and a little music.
John Keats
John Keats