EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: German_EE on April 01, 2019, 05:48:12 pm

Title: 16-bit USB I/O
Post 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?
Title: Re: 16-bit USB I/O
Post by: Boscoe on April 01, 2019, 06:02:15 pm
FT600 but it's not simple. Otherwise use a UART bridge with a micro reading your values.
Title: Re: 16-bit USB I/O
Post by: SiliconWizard on April 01, 2019, 06:05:00 pm
If you're looking for a ready-made and relatively cheap option: https://numato.com/product/32-channel-usb-gpio-module-with-analog-inputs
Title: Re: 16-bit USB I/O
Post by: lucazader on April 01, 2019, 06:29:41 pm
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.
Title: Re: 16-bit USB I/O
Post by: magic on April 01, 2019, 07:32:38 pm
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)
Title: Re: 16-bit USB I/O
Post by: asmi on April 01, 2019, 08:12:47 pm
FT600 but it's not simple.
What's NOT simple about it? What could possibly be more simple than parallel FIFO-style interface? :o
Title: Re: 16-bit USB I/O
Post by: rstofer on April 01, 2019, 09:41:53 pm
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)
Title: Re: 16-bit USB I/O
Post by: KE5FX on April 01, 2019, 10:22:03 pm
The Cypress FX2 is probably what you want.
Title: Re: 16-bit USB I/O
Post by: NiHaoMike on April 02, 2019, 01:37:59 am
Definitely recommend the FX2. In fact, get at least two so you'll have one to use as a logic analyzer with Sigrok.
Title: Re: 16-bit USB I/O
Post by: reboots on April 03, 2019, 03:49:38 pm
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)
Title: Re: 16-bit USB I/O
Post by: janoc on April 03, 2019, 06:44:34 pm
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
Title: Re: 16-bit USB I/O
Post by: JVR on April 12, 2019, 02:34:33 pm
16F1459.

You should have USB up and running in a few minutes. It can run a DFU bootloader, and it is tiny.
Title: Re: 16-bit USB I/O
Post by: PCB.Wiz on April 12, 2019, 07:47:52 pm
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)
Title: Re: 16-bit USB I/O
Post by: Brutte on April 13, 2019, 02:09:07 am
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.
Title: Re: 16-bit USB I/O
Post by: amyk on April 13, 2019, 02:58:48 am
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. ;)