4

I have a chip that uses SPI for communication and would like to connect it directly to the USB port on my computer. Does anyone have experience with using a USB to SPI converter? Any recommendations? Quick searches on the web revealed

http://www.robotshop.com/devantec-usb-i2c-spi-serial-interface.html

http://www.sparkfun.com/products/9235

umps
  • 1,119
  • 4
  • 15
  • 25

3 Answers3

7

The "FTDI" chip that they use sparkfun product above is typically the easiest way to go.

There is a publicly available "libftdi" (maybe two of them?) that let you talk to the chip via USB. This chip provides a very simple USB-to-GPIO type functionality, and is used to make USB-to-JTAG, Serial, Parallel, CAN, SPI, etc devices.

The FTDI device doesn't require any "programming" - I think you punch a configuration block into it to describe how you want the pins do work, and that's it.

The other alternative is to do what the robotshop product you mentioned does. Use a USB-based PIC controller. This requires you to program the controller, and write your own device driver for your device. Neither of which are very hard, and could offer you more flexibility but a bit more work. Microchip has many PIC variants with built-in USB controllers, and they all have many GPIO lines for you to program into any kind of SPI interface you would want to.

Brad
  • 11,262
  • 8
  • 55
  • 74
  • I have the SPI Shortcut and it does not appear to support a simple "passthrough" mode in which data written to the virtual com port are simply passed out/along. It has a terminal/console program running which appears to be designed for testing equipment but I do not know if this can be easily used/controlled in a production environment since sending data needs to be prefixed by selected 'menu options' in their terminal program. – James Apr 30 '13 at 22:31
  • 1
    What about a way to expose the SPI interfaces of a FT4232H in a x86 computer like we have in ARM SoC at `/dev/spi`? I guess this is what the OP was looking for. – TCB13 Apr 02 '22 at 20:51
0

I used the FTDI FT4222H (in the form of a UMFT4222EV-D development board). It converts I2C, SPI, and a few GPIOs to USB. My use case was acting as a high-speed SPI slave (I only needed to read data). Using the LibFT4222 library I was able to get this working on Windows using C# and on Raspberry Pi using C.

https://ftdichip.com/products/ft4222h/

https://www.digikey.com/catalog/en/partgroup/ft4222h-evaluation-module-with-d-version-chip/78324

https://ftdichip.com/wp-content/uploads/2020/07/DS_UMFT4222EV.pdf

Chet
  • 3,461
  • 1
  • 19
  • 24
-1

https://learn.adafruit.com/usbtinyisp quite a simple device made with a very popular ATtiny AVR8 (arduino chips should fit). Fully FOSS and ready-made available.