USB to SPI converter

umps picture umps · Feb 11, 2011 · Viewed 16.2k times · Source

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

Answer

Brad picture Brad · Feb 11, 2011

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.