Getting GPIO out of a PC? Best way?

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

Reply to
haiticare2011
Loading thread data ...

erally

best way

SATA 3 -

d.

This

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

Reply to
Lasse Langwadt Christensen

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.

Reply to
David Brown

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.

Reply to
krw

If you need a few, the serial port control pins are easy to use. I would not call them fast, and you need level translation. A PPort card would be the best poor mans solution.

Cheers

Reply to
Martin Riddle

Get a Parallel printer type port? Just a thought..

Jamie

Reply to
Maynard A. Philbrook Jr.

formatting link
formatting link
formatting link

Of course, then you also get to write a driver or obtain one. Unless the selectedd card comes with one.

formatting link

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

I/O is pretty decoupled from the CPU in a modern PC.

Since you say nothing about the speed you need, the simplest would probably be a printer port card, or the control lines on a serial port card. Interposing USB in the middle would probably add some additional latencies but there's going to be plenty of latencies and jitter anyway.

A lot will depend on what's happening in the drivers, BIOS and what operating system you are using.

Often it's better to loosly couple a small processor (by USB or whatever) to the PC and do high-speed stuff with that (perhaps augmented by an FPGA).

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

I don't think they will help much unless you but a gizmo on the other end, probably something like a FPGA or small micro.

The parallel port on USB will work, but USB is polled, so it's ballpark of

1 ms per clump. So that's 500 Hz if you are toggling a bit. Parallel ports have a handskake mode that might let you go faster.

If you like Linux, look into a Raspberry PI or the various flavors of BeagleBone. They are ARM SoC type chips with real GPIO pins running Linux.

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

Well, SATA is a pretty specialized protocol, which in addition to everything else is clocked spread-spectrum so it's not really suitable for GPIO. Most peripherals on a modern x86 PC are pretty removed from the CPU control, because wiggling I/O directly from a 3 GHz processor is just not feasible; it's handled by the motherboard chipset that connects GPIO across a series of buses, usually starting with PCI.

ARM, on the other hand, traditionally keeps the IO close to the CPU and doesn't even have motherboard chipsets. TI ARM units, such as the AM335x on the $45 beaglebone platform, have a pretty cool feature: the CPU is packaged with two I/O processors called PRU. Each PRU is a 200MHz RISC 32- bit unit, with access both to the processor bus and to the peripheral circuits, that run autonomously, and therefore can wiggle the I/O pins at intervals guaranteed not to be less than 50 ns. In practice, reaching

200MHz is not quite possible, but 50-100 MHz is doable.

The traditional x86 architecture is not even trying to have advanced GPIO. Intel for instance produced an embedded small form-factor board called Galileo, as a response to all those embedded ARM and AVR boards. It has GPIO, but they implemented it as an I2C parallel port, with the speed limited to 200 Hz---pretty sad.

If you are tied to x86 PC and/or Windows, your best bet would be PCI parallel ports. Usually the speed will be in the south of 100kHz, and you can get 8 bits of output and a similar number of input bits per each port.

Reply to
Przemek Klosowski

a serial port has 3 outputs and 5 inputs else a PCI or PCIe parallell port or attach a microcontroller somewhere.

--
umop apisdn 


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Reply to
Jasen Betts

enerally

e best way

d SATA 3 -

eed.

t. This

a parallel port at maybe a few hundred kilohertz but that's 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

Reply to
haiticare2011

I'm afraid the dev board is not going to have the SW dev environment. Thanks. JB

Reply to
haiticare2011

Thanks. Looking for something serial and faster. JB

Reply to
haiticare2011

Thanks. need faster serial line. jb

Reply to
haiticare2011

Thanks. Seems too slow and difficult to implement. jb

Reply to
haiticare2011

Thanks, yes, I see that approach. But then how to interface the BBB to the PC? jb

Reply to
haiticare2011

Hal Murray

Thanks - then question becomes, how to interface to Pi or BBB board? jb "This is deja vu all over again." - YB

Reply to
haiticare2011

Yes, thanks, I have seen that PRU feature o the BBB, but it's lacking a compiler now - But overall problem is "How to connect PC to the BBB/Pi board?" jb "If you see a fork in the road, take it." - YB

Reply to
haiticare2011

You don't say how fast you need it or how many channels. You can buy various IO cards for industrial kit for a price but they are a minority interest and can easily cost more than a generic PC.

STM32M4 Discovery or similar will do it and behave as a USB device for

Learning curve on the ARM CortexM4 is a bit steep at first.

If you described the bandwidth you wanted you might get better answers.

--
Regards, 
Martin Brown
Reply to
Martin Brown

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.