Bit Banging VGA From An SD Card Slot

If you’ve got some favorite electronic device that includes an SD card slot but doesn’t have a video out port you may be able to push VGA signals through the card reader conductors. That’s exactly what’s going on above with the Ben NanoNote, a sub-$100 Linux device which we’ve seen using its SD card slot as general I/O before.

The hardware to capture the signals includes a breakout board for the card slot. Free-formed on the other end of that connector card is a gaggle of resistor which handle level conversion for the VGA color signals, with a VGA cable taking it from there to the monitor. The software that makes this happen is a dirty hack, blocking all other functions while it displays a still image. But we’re sure that it can be cleaned up somewhat. Just don’t hold out hopes for full-motion video, this little guy just doesn’t have it in him.

[via Dangerous Prototypes via Slashdot]

14 thoughts on “Bit Banging VGA From An SD Card Slot

  1. It’s actually a mixture of big-banging (for hsync/vsync) and making the MMC controller think there’s an MMC device and sending the pixel data line by line with a block write. An earlier version did only big-bang but only got to a resolution of 320×480 (with line doubling, so it displayed 320×240).

    Video … hmm. It should be quite feasible to pre-decode a few frames, store them in RAM, and then stream them from there. A VGA frame is about 160 kB, the Ben has 32 MB, so if we let this take half of it, it could store a 4 seconds clip at 25 fps …

    USB SD reader. That might be more difficult. Maybe, if the monitor isn’t too picky about the timing, you can trick the controller into doing a block write, and you send the sync signals as part of the data stream. That would take away two color bits. Well, 2 bit grayscale wouldn’t be so bad :-)

  2. – Everyone defines “hack” a little differently, I would argue that this definitely qualifies.
    – Not every hack needs “value”. Some times it’s just fun, and to some people that (and the learning experience) is enough.

  3. Maybe I should mention how the MMC controller starts the transfer: it first sends a command to the device. Then it tri-states the CMD line and waits for a response. Now, we don’t have a real device there, so a pull-down resistor provides that start bit. Luckily, the controller doesn’t try to make sense of the rest of the response.

    Now, it would be a shame to lose an entire signal line (of which we only have six) just for this handshake. But as it happens, the hsync pulse has to be sent just around the time this start bit is needed.

    CMD is configured as a GPIO most of the time. Before the start bit, it is driven low (hsync), then the pin is configured as the device function (i.e., MMC CMD), which starts the data transfer, and goes right back to GPIO and driven high afterwards.

Leave a Reply to Hungry_MystCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.