EEVblog Electronics Community Forum
Electronics => Microcontrollers => Topic started by: German_EE on April 01, 2019, 05:48:12 pm
-
This post has been placed in the microcontroller section on purpose as the answer will probably be a custom programmed chip.
I have a need to transfer 4 x 16-bit words from some 74HC based counters to a PC and this needs to be done over a USB port. Once in the PC the four words will be assembled into two 32-bit words and some math performed.
However................
I'm having a lot of trouble finding a 16-bit USB interface. Lots of people sell eight bit USB expanders and one is selling a twelve bit unit but using either of these will increase the chip count significantly. Does anyone know of a company that sells a 16-bit wide USB interface with either TTL or CMOS inputs?
-
FT600 but it's not simple. Otherwise use a UART bridge with a micro reading your values.
-
If you're looking for a ready-made and relatively cheap option: https://numato.com/product/32-channel-usb-gpio-module-with-analog-inputs
-
If you are looking for more of a mass production part, then a microcontroller might be best.
Quite simple to pick up an ARM based micro with USB (say STM32F042) program it as a USB CDC device (virtual com port). and then just read in the data required on the pins of the micro.
But only go this route if you need more of a production ready option.
-
Cypress FX2
Chips and cheap breakout boards are available.
A trivial firmware for it and corresponding PC utility: http://lea.hamradio.si/~s57uuu/uuusb/uuusb_software.htm (http://lea.hamradio.si/~s57uuu/uuusb/uuusb_software.htm)
-
FT600 but it's not simple.
What's NOT simple about it? What could possibly be more simple than parallel FIFO-style interface? :o
-
A USB HID Device is made for this kind of low volume transfer. I used it in a uC to transfer knobs, switches and dials to Microsoft Flight Simulator. The standard packet is 64 bytes and you can use the bits anyway you want.
I used RAWHID on a Teensy from PJRC. I think I also used a Microchip board from Digilent but it's been a long time.
https://www.pjrc.com/teensy/rawhid.html (https://www.pjrc.com/teensy/rawhid.html)
-
The Cypress FX2 is probably what you want.
-
Definitely recommend the FX2. In fact, get at least two so you'll have one to use as a logic analyzer with Sigrok.
-
Fourthing(?) Cypress FX2. Here's a cheap and widely available development board which exposes 16 I/O:
https://www.ebay.com/itm/NEW-EZ-USB-FX2LP-Cypress-CY7C68013A-USB2-0-Developement-Board/322196121309 (https://www.ebay.com/itm/NEW-EZ-USB-FX2LP-Cypress-CY7C68013A-USB2-0-Developement-Board/322196121309)
Sigrok's fx2lafw firmware and PC-side software might be a good starting point.
https://sigrok.org/wiki/Fx2lafw (https://sigrok.org/wiki/Fx2lafw)
-
FTDI's FT232H, these can be configured to SPI mode. Then just use two 8 bit shift registers to interface your logic. Dongles and breakouts with FT232 can be found cheaply, e.g.
https://learn.adafruit.com/adafruit-ft232h-breakout/spi
-
16F1459.
You should have USB up and running in a few minutes. It can run a DFU bootloader, and it is tiny.
-
I'm having a lot of trouble finding a 16-bit USB interface.
If you need speed, the FX2 mentioned above is fast, and has low cost modules.
If you need lowest price for volumes, then a small MCU is better.
PIC16F1459 mentioned above is Microchip 8b offering.
Similar, but cheaper are SiLabs EFM8UB1 (64c/3k) or EFM8UB3 (93c/3k)
-
We do not know the speed, the latch to latch 64 bits and of course the quantity. If that is just for test and the signal is ms range then I would just buy several FT232R cables (these chips have parallel 8-bit interface). Or several eBay logic analyzers.
If that is for mass production then that is a different story.
-
Definitely recommend the FX2. In fact, get at least two so you'll have one to use as a logic analyzer with Sigrok.
Also known as a "Saleae clone", except that the real Saleae uses only 8 of the 16 channels the FX2 can provide. ;)