Getting GPIO out of a PC? Best way?

Thanks Attaching the MCU, how? jb

"This is deja u all over again." YB

Reply to
haiticare2011
Loading thread data ...

enerally

e best way

d SATA 3 -

eed.

t. This

a parallel port at maybe a few hundred kilohertz but that's it

At this point, I am looking for a SPI type fast serial line at fairly high speeds > serial port. JB

Reply to
haiticare2011

SPI from a USB 3.0? Does it exist? Thanks jb

Reply to
haiticare2011

Use an FTDI module, as I said before. They support fast SPI, connected to the PC by USB. I've used them for programming SPI flash chips at a rate of 100+ KBps.

And for connecting your microcontroller to the PC, the easiest way is to use the serial port (UART) on the microcontroller connect to - wait for it - an FTDI module. UART speeds of 2 or 3 Mbaud should be fine, if the microcontroller is fast enough.

Reply to
David Brown

Not USB3 (only 2) but look at the FT221X. I have a couple here and designed a PCB, but haven't yet got organised to build it yet.

Reply to
Clifford Heath

OK. Now look at

formatting link
DLN-4M board for USB 2 SPI. Waddya think? jb

Reply to
haiticare2011

at risk of boring everyone to death, I reposted the GPIO as an SPI need. (GPIO always appreciated as add on, of course.)

================

Thank you all for your thoughts on this. I want to clarify my question, since the issue has become more focused, as I see it.

What I'm looking for s a high speed USB to SPI interface. Thw question becomes: "How much latency is there in USB 3.0? " Some posters have said USB has a great deal of latency, which is disturbing.

But if that's not a problem, the high speed boards from

formatting link
- the DLN-4M as I recall, does USB 2 SPI at 480 mHz they say.

The reason I am interested in this capability is the following: The PC platform enjoys high speed engineering design due to a huge market for gamers and general PC speed requirements. Software-wise, the OSes running on the PC have garnered the most attention, so compilers, etc. are most advanced there. In sum:

-SSD storage over SATA 3; 6 gB/s. SSD is 10,000x faster than HD.

-4 gHz cpu + up to 32 gB DDR3 RAM

-USB 3.0 fast transfer.

-software platforms mentioned.

So it makes sense to have the "center-of-gravity" near the PC platform. Then the focus moves to how to interface HW to the PC for fast transfer. The USB 3 interface seems the main serial channel to do this, so naturally I ended looking at USB 2 SPI interfaces like the

formatting link
boards.

Any thoughts appreciated.

JB

Reply to
haiticare2011

One of the USB modes might work for you. Look at the Labjack devices for an example.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward" 
speff@interlog.com             Info for manufacturers: http://www.trexon.com 
 Click to see the full signature
Reply to
Spehro Pefhany

If you want to work with someone else's software of unknown quality, and think it'll save you the extra $$, go for it. Otherwise you can get almost the exact same hardware functionality from the $15 STM32F4Discovery, as you've already been told (though I think David left out a letter in the board name). If all you want is SPI to integrate onto another board, the FT221X might work.

Reply to
Clifford Heath

The BBB has an 100Mbit/s Ethernet port. You can also use it's USB port as an emulated Ethernet.

Reply to
Reinhardt Behm

No, I didn't mean getting a particular STM board. I meant he should get an FTDI module, such as the FT4232H from this page:

I hadn't bothered giving links, because I had assumed the OP was capable of using google to find FTDI's website and then clicking on "products" and "modules" all by himself.

Following that link gives many other modules, including ones with an FPGA on board, if the OP wants to go that route. There is little point in going for an FT221x - that range is primarily aimed at smaller, cheaper and fewer external components than the FT4232H chip, which does not matter when you are using a ready-made module.

Regarding USB3, it is pointless. USB2 is more than enough - if you think you USB3 is the answer to anything other than a harddrive, then you have asked the wrong question.

Until the OP gives some relevant information about the application, I don't think there is any point in speculating about a microcontroller - that just adds more complications that are hopefully not necessary.

So I would get an FT4232H board and start from there. They are easy to get hold of, and there is lots of support for controlling them both from FTDI and third parties.

Reply to
David Brown

You can buy a board such as if you need high speed.

For lower speed, buy .

For USB use or something similar.

Reply to
sms

Say thanks that's great - much appreciated. Have you used any ftdi chips, etc. to do anything? More later...jb

Reply to
haiticare2011

Thanks I will look at asap. JB

Reply to
haiticare2011

generally

best way

SATA 3 -

speed.

Make that Gb/s. (about a 10:1 lower value).

best. This

What total transport rate do you want? Can the mainboard handle the DMA rate? Is the DRAM interface fast enough?

?-)

Reply to
josephkk

We use them regularly as USB-to-UART chips on many of our boards. In the good old days, an embedded microcontroller card would often have an RS-232 port for communicating with a PC (to provide a user-friendly interface after installation, or in use during setup, testing, etc.). The modern version is an FTDI chip and a USB connection. By using the FTDI chip, you avoid all complications normally associated with USB - drivers, setup at the microcontroller end, complicated software at each end, etc. It just becomes simple and easy UART communication - but faster than the limits of RS-232. There are FTDI drivers for all versions of Windows, and Linux has supported them for many years in the kernel. It is therefore simpler to use than USB ports built into a microcontroller.

We also use FTDI modules such as the FT4232H with its SPI port for programming SPI bus flash on cards. I've used the FT2232B to make a debugger for a Coldfire chip, and most ARM JTAG dongles consist of an FTDI chip and some buffers.

And I have also used an FT4232H module as a GPIO module with some switches and LEDs.

I usually use the "pyftdi" library for controlling these using Python, but I have also used Delphi, and you can get interface libraries for pretty much any language you want to use.

Reply to
David Brown

excellent. Thanks. I am interested in interfacing an ADC chip ti ads8344, to a PC. Yes, I know I could use something much slower, even a Labjack, but I am contemplating some projects to do seti-like information gorging. The ads8344 likes a SPI-like signal to strobe it on and collect the result. The chips can be daisy-chained. I was experimenting with a microchip cpu "intelligent analog" which boasts very high ADC rates, but the idea to jump into a particular architecture because it does ADC fast is putting the cart before horse, imo.

The pointer to use pyftdi is appreciated - I plan to do the project in Python.

I wonder which OS you are running? Windows 7 / Linux?

Also, I noted the USB driver for the ft4232h configures the unit as 4 virtual com ports - But they also said the driver can access the chip directly (afaiui). If that's so, how do you handle that?

Thanks again for pertinent info.

JB

Reply to
haiticare2011

sorry for delay. :) Yes, I'd say dram fast enough. I just want all the capacity I can easily get, since I plant to scan a number of inputs, in an open 'seti-like' fashion. What have you got up your sleeve? jb

Reply to
haiticare2011

Thanks for that. I'm thinking of Dave Brown's solution, but this looks good. jb

Reply to
haiticare2011

You are missing the big picture. The Pi and BBB run Linux. You run your code directly on them rather than on the PC.

--
These are my opinions.  I hate spam.
Reply to
Hal Murray

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.