(no title)
jodoherty | 1 year ago
https://www.adafruit.com/product/2264
https://ftdichip.com/products/ft2232h-mini-module/
Bit banging on a modern OS subjects you to a lot of jitter though. It's not like using a parallel port in DOS where you just have to worry about interrupts. The preemptive scheduler can really mess up your timing.
That said, the FT232H, FT2232H, and FT4232H have an FTDI Multi-Protocol Synchronous Serial Engine (MPSSE) cores that you can program to protocols like SPI and I2C where the high speed part doesn't require any smart logic to handle. It's a bit of a special skill though (you send MPSSE specific command bytes over the USB interface into the chip's command buffer and tell it to execute them).
If you need more high speed smarts, it's also convenient to use a Raspberry Pi Pico with MicroPython or CircuitPython with Programmable I/O (Pio) with an interactive session:
https://www.raspberrypi.com/news/what-is-pio/
https://docs.micropython.org/en/latest/rp2/quickref.html#pro...
But yeah, beyond that, you're better off using an Arduino or something and doing it all on the microcontroller.
On the plus side, all of these things are relatively cheap and easy to obtain.
rendaw|1 year ago
I can't believe I'm not missing something... Is there an off the shelf USB GPIO device somewhere? Plug it in and start using the linux GPIO driver?
The solution my friends gave me was "buy an arduino", flash the arduino, and use the arduino's gpio... which yeah, I could do, but is that really what it takes for a $2000 desktop to flip a bit these days?
invalidator|1 year ago
https://www.adafruit.com/product/2264 - USB to GPIO (and other stuff)
"Bus Pirate"
Or get a RasPi - it's not your desktop PC, but they're running Linux with direct GPIO access available in userspace.
sokoloff|1 year ago
swatcoder|1 year ago
numpad0|1 year ago
jodoherty|1 year ago
http://developer.intra2net.com/git/?p=libftdi;a=blob;f=examp...
It's dead simple to also use these FTDI devices with Python:
https://eblot.github.io/pyftdi/api/index.html