Getting video with USB SPI from device with FTDI
I need to implement Device manag开发者_如何学运维er for some card with FTDI chip. We are looking into JAVA or C#, and we need to use it for transferring vedio using SPI. Do we need to use FTDI DLL for java or C#? Can we encounter serious problems implementing this in java ?
I have used the direct connection with the FTDI DLL using both Java and C#. For Java I have used ftd2xxj, even contributed some extensions to that. Works very and seems actively being maintained. I switched to C# 2 years ago and I'm using the wrapper provided by FTDI FTDI C# Wrapper. This also works perfectly, and I would say using one of these libraries is the recommended way to connect to your device instead of using a serial port connection. You can tune a lot of things such as the latency on the USB port and packet buffer sizes and such. I can imagine this can come in handy with video.
The Java option is fully open-source and business friendly, the C# version is provided as is without any restrictions to redistribute etc.
I have an app that uses ftdi. The solution I selected is to use a C DLL and call the c routines with JNI.
There's also the libftdi/libusb approach if you want a more open source approach. I'm not to sure what interfaces to these exist for Java and c# though.
I have tested multiple FTDI chips in C and C# to do USB to SPI/I2C from Windows. For Video generally SPI with an extra pin called D/C (data command ) is what is supported by displays devices.
Here is a video with an FT232H board + an OLED 128x64 display in SPI I used the default ftdi windows C SPI library. The FT232H can deliver up to 3M byte/S in SPI in theory.
The device Nusbio (based on the FT232RL) also support I2C/SPI at a smaller transfer speed and works with the OLED 128x64 display in SPI. Nusbio can deliver up to 20 K byte/S in SPI for display. The Nusbio library is written in C#.
I am currently experimenting with the FT4222 chip in I2C or SPI using the FTDI C library on top of which I wrote a C# library. The FT4222 can deliver up to 500 K byte/S.
In conclusion you have to pick your chip and if your OS target is Windows C + C# would be my advice. FTDI does not provide a lot of support/samples for C#, but that is what I do.
精彩评论