USB to SPI converter [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this questionI have a chip that uses SPI for communication and would like to connect it directly to the USB port on m开发者_Go百科y 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
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.
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
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.
精彩评论