Getting GPIO out of a PC? Best way?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
GPIO pins, which are just digital high-low pins under SW control, are generally  
the simplest output from a CPU IC. Does anyone have an opinion about the best way
 to get this functionality out of a generic PC?  

For instance, a generic PC (a fast one) these days will have USB 3.0 and SATA 3 -  
6 gB/s. As well, cards exist for a parallel port, though not sure of speed.

Anyone have any ideas about this? High speed is appreciated. Serial best. This  
'should' be easy.  

jb



Re: Getting GPIO out of a PC? Best way?

Quoted text here. Click to load it
erally  
Quoted text here. Click to load it
best way
SATA 3 -  
Quoted text here. Click to load it
d.
 This  
Quoted text here. Click to load it

doesn't exist, any micro controller will run circles around a PC when
it come to bit banging  output pins

jumping through lots of hoops some CNC software manages to bitbang IO on a  
parallel port at maybe a few hundred kilohertz but that's it

-Lasse

Re: Getting GPIO out of a PC? Best way?
On Sunday, May 18, 2014 2:38:02 PM UTC-4, Lasse Langwadt Christensen wrote:

Quoted text here. Click to load it
enerally  
Quoted text here. Click to load it
e best way
Quoted text here. Click to load it
d SATA 3 -  
Quoted text here. Click to load it
eed.
t. This  
Quoted text here. Click to load it
a parallel port at maybe a few hundred kilohertz but that's it
Quoted text here. Click to load it

sad. A mcu is OK, but then how to connect it to PC? The reason for PC is to
 get SSD and high speed SW caoacity, 4 gHz cpu + SSD etc.
Any idea how to connect ARM 2 PC?  Thanks for reply. b

Re: Getting GPIO out of a PC? Best way?
On Mon, 19 May 2014 03:15:55 -0700 (PDT), snipped-for-privacy@gmail.com
wrote:

Quoted text here. Click to load it

Quoted text here. Click to load it

USB.  Pick your speed.

Re: Getting GPIO out of a PC? Best way?
On Sunday, May 18, 2014 2:38:02 PM UTC-4, Lasse Langwadt Christensen wrote:

Quoted text here. Click to load it
enerally  
Quoted text here. Click to load it
e best way
Quoted text here. Click to load it
d SATA 3 -  
Quoted text here. Click to load it
eed.
t. This  
Quoted text here. Click to load it
a parallel port at maybe a few hundred kilohertz but that's it
Quoted text here. Click to load it

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


Re: Getting GPIO out of a PC? Best way?
On 19/05/14 12:32, snipped-for-privacy@gmail.com wrote:
Quoted text here. Click to load it

Quoted text here. Click to load it

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.


Re: Getting GPIO out of a PC? Best way?
On 18/05/14 19:33, snipped-for-privacy@gmail.com wrote:
Quoted text here. Click to load it

The simplest method is to connect an FTDI module by USB.  You can do  
bitbanging with it, but speed will be a bit limited and there will be a  
lot of variation in the timing.  You can do better with SPI or UART from  
the same sort of modules - you can get several Mbps that way.


Re: Getting GPIO out of a PC? Best way?
On Sunday, May 18, 2014 4:27:01 PM UTC-4, David Brown wrote:
Quoted text here. Click to load it

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

Re: Getting GPIO out of a PC? Best way?
On 19/05/14 20:32, snipped-for-privacy@gmail.com wrote:
Quoted text here. Click to load it

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.


Re: Getting GPIO out of a PC? Best way?
On Monday, May 19, 2014 7:59:59 AM UTC-4, Clifford Heath wrote:
Quoted text here. Click to load it

OK. Now look at www.diolan.com DLN-4M board for USB 2 SPI. Waddya think?
jb

Re: Getting GPIO out of a PC? Best way?
On 19/05/14 22:08, snipped-for-privacy@gmail.com wrote:
Quoted text here. Click to load it

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.

Re: Getting GPIO out of a PC? Best way?
On 19/05/14 14:54, Clifford Heath wrote:
Quoted text here. Click to load it

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:

<http://www.ftdichip.com/Products/Modules/DevelopmentModules.htm

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.


Re: Getting GPIO out of a PC? Best way?
On Monday, May 19, 2014 11:27:33 AM UTC-4, David Brown wrote:
Quoted text here. Click to load it

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

Re: Getting GPIO out of a PC? Best way?
On 20/05/14 00:47, snipped-for-privacy@gmail.com wrote:
Quoted text here. Click to load it

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.



Re: Getting GPIO out of a PC? Best way?
On Tuesday, May 20, 2014 3:20:31 AM UTC-4, David Brown wrote:
Quoted text here. Click to load it

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





Re: Getting GPIO out of a PC? Best way?
On 20/05/14 19:15, snipped-for-privacy@gmail.com wrote:
Quoted text here. Click to load it
I hadn't bothered giving links, because I had assumed the OP was capable
Quoted text here. Click to load it

(You really should get yourself a newsreader and a newsserver instead of  
that crap Google Groups interface that always messes up quotations.)

Quoted text here. Click to load it

Avoid Microchip's microcontrollers if you can.  They come in big  
packages, which can be nice if you are making a board in your cellar,  
but the PIC cpu is hideous (it competes with the 8051 for the worst cpu  
ever to become popular).  Their non-microcontroller parts are usually good.

The ADS8344 will do a fine job, run with the internal clock (to save you  
having an external one).  Forget the "busy" signal, it would just  
complicate matters.  Don't daisy-chain them - they cannot easily  
daisy-chain.  Instead, connect the devices mostly in parallel but with  
separate chip selects to individual IO's on the FTDI device.

Quoted text here. Click to load it

Mostly Linux, some Windows (I have an old XP machine, but the end result  
usually has to run on XP and Win7).  I do most of the development on  
Linux, however.

Quoted text here. Click to load it

You can choose yourself how to configure the chip.  By default, it  
registers as 4 virtual comms ports, but you can access it with the  
library code from FTDI and override the modes.  The application notes  
from FTDI about using the chip for SPI are definitely worth reading,  
even if you use pyftdi instead of FTDI's own libraries.

Quoted text here. Click to load it


Re: Getting GPIO out of a PC? Best way?
On Tuesday, May 20, 2014 3:44:14 PM UTC-4, David Brown wrote:

Say David
Thanks again. Yes, Google groups is hideous. I'll work on T-bird.  

Tell me what you think of the pci card that "sms" mentions in this thread? Can  
you  
compare it?  

Thanks in advance. Your advisement on separate pin-outs for ADC appreciated.  
JB

-I wonder if I can get a refund on microchip board I bought when dazzled by the  
big lights. :)  

Re: Getting GPIO out of a PC? Best way?
On 20/05/14 22:36, snipped-for-privacy@gmail.com wrote:
Quoted text here. Click to load it

Thunderbird with news.eternal-september.org is free, and works well.

Quoted text here. Click to load it

If you need the fastest speeds and lowest latencies, then an internal  
PCI card is a possibility - it will be high speed, and have direct DMA  
access to memory.  But if you can avoid that, do so - PCI cards are much  
higher risk (if something goes wrong, you can mess up your PC), and a  
lot more fuss for drivers and so on.  If it matters in your application,  
they are also harder to change if something goes wrong, and replacement  
parts or similar alternatives are going to be difficult to find in the  
future.  And inside a PC is the worst place to do any ADC measurements -  
it is too electrically noisy.

Thunderbolt, the new fast serial link found in some PC's, is more  
interesting - it is effectively PCI Express over an external cable.  
That negates many of the disadvantages of an ordinary PCI Express card.  
  The only problems are that you probably can't find any Thunderbolt  
connected ADC cards, and your PC probably doesn't have a Thunderbolt  
interface.

Quoted text here. Click to load it


Re: Getting GPIO out of a PC? Best way?
On Mon, 19 May 2014 03:32:48 -0700 (PDT), snipped-for-privacy@gmail.com
wrote:

Quoted text here. Click to load it

Sure, in any number of forms from bare uC chips, to development
boards, to something like an Aardvark.  There are many, many, options.

Re: Getting GPIO out of a PC? Best way?
On Sun, 18 May 2014 10:33:09 -0700 (PDT), snipped-for-privacy@gmail.com
wrote:

Quoted text here. Click to load it

A uC with the appropriate number of PIO bits and built-in USB?  If you
just need onesy-twosy, a dev board of your favorite uC should work
fine.  Of course, it's going to be slow and indeterminate latency.



Site Timeline