The Raspberry Pi Model B+ was just released, and now everyone who picks one of those up has a few more GPIO pins to play around with. For the millions of people with the two-year-old version of the Pi, we’re still stuck with the same old, same old: 17 GPIOs on the big header, and that’s about it as far as toggling pins goes.
The Broadcom SoC on the Pi has far more GPIO pins than are broken out on the large header, and a few of those go to the CSI camera interface. These GPIOs can be broken out with a few flat cables (Portuguese, Google Translatrix), giving you four more GPIOs, and this technique can also be used with the new, expanded Model B+.
The CSI camera connector has two I²C lines that go directly to the camera, controllable in Linux as GPIO0 and GPIO1. There are two more GPIO connectors on the CSI connector controllable as GPIO5 and GPIO21. By carefully slicing and soldering wires to a flat cable, these GPIO lines can be broken out onto a breadboard.
There’s a video below demonstrating these GPIO lines being used to control a few LEDs. Of course, anything that is possible with a normal Raspi GPIO is possible with the CSI connector GPIO lines.
This is a really trivial hack. But it’s useful though.
Indeed, I’d put it right there with the folks removing the ethernet and USB jacks from a model B to get a model A form factor with 512MB RAM. The majority of Pi users won’t ever do this, but it’s great for the few who might need it.
That was done generally before the model A was released from memory.
I don’t think you made the mental leap from my first sentence to the second one, unless you meant to say the ribbon cable hack has been done since before the model A was released? My first sentence agreed with Dodo, that this is trivial but useful, like cutting down a model B to save space was. My second sentence was saying that the majority of Pi users won’t ever do the ribbon cable hack. Sorry if I confused you.
It’s not really “adding” GPIOs, since they are already there.
Actually, yes it is; while the outputs were already there, prior to this, the were single-purpose (only meant for the camera) not general-purpose (usable for anything you feel like).
I wonder if you could make a 1541 emulator out of this. It does have an UART so it should be possible.
Could the reverse be done? Using the GPIO pins on a pi zero to create a CSI interface for a camera?
No, because the CSI interface is high-speed LVDS (Low Voltage Differential Signaling) and requires a specialized hardware interface (in the BCM2835) for serializing/deserializing/level conversion, etc. The GPIO pins are strictly for simple hardware interfaces (e.g. I2C, SPI, UART, etc.) or for bit-banging by software.