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.
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.
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.
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.
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
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.
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
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
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.
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.