Accessing an SD card through a parallel port, just because

[Vinod] sent in a very cool build he says is somewhat of a ‘mad project’: he mounted an MMC and SD card under Linux using the parallel port on his computer. Even though parallel ports are getting rarer these days, we absolutely love [Vinod]’s dedication and willingness to dig around the Linux kernel.

The hardware portion of the build is very simple – just an SD/MMC header and a few resistors wired up to a parallel port. The software side of the hack gets pretty interesting with [Vinod] building a kernel module, something we rarely see on Hackaday.

We’d have to agree with [Vinod]’s ‘mad project’ sentiment, if only because of the terrible throughput of [Vinod]’s adapter; it takes him more than a minute to transfer a 1.5 MB file onto the SD card – terribly slow, to put it mildly. Nevertheless, we’ve got to respect [Vinod] for pushing the limits of uselessness and still building something cool in the process.

Looks like it could be really useful for me – I have a 8Gb SDHC card that got scrambled when it was taken out of a Nokia phone at the wrong time and nothing can reformat it. I have read that the only thing that can descramble it is a Nokia N95 phone as it talks to the SD card directly rather than through a controller. maybe this hack would allow the card to be unlocked and reformatted or even better allow me to retrieve the data that is stuck in it.

Oh come on, OpenWRT guys have been doing this (mmc-over-gpio in particular) for ages. Besides, there already is an mmc-spi driver in the kernel, there are spi-bitbang and spi-gpio drivers, so what we see here seems a bit overengineered.

Thanks for explaining it, I didn’t know so thats why I asked. I was not trying to be rude. I thought it was only “an” if it was a vowel. I didnt know it included ones that sould like vowels too. Thanks.

In the vein of helpfulness, words which start with a consonant sound should be preceeded with an “a” even though they may start with a vowel. For example “a university”.

Certain words which start with “h” complicate things further. I’m probably going to miss a criteria here but I’ll give it a go. Polysyllabic words, beginning with “h” which is unaspirated and followed by a vowel sound can take either “an” or “a” as it pleases the user. It’s easier to remember these as words which commonly drop the h at the start: hotel, hospital, etc.

This particular rule confuses many English speakers, even native speakers, and that last example illustrates that very well. The H sound in “hotel” and “hospital” is only dropped in some dialects of English, at which point you’d use an “an” in front of them. If the H sound is pronounced, however, then an “a” belongs in front of it.
The easiest way to figure it out is to try to say it. If you can say it with “a” and string the words together without a stop, it’s probably right. If you can’t, then it needs the N sound from “an” to allow you to string it together.

Extra information: I’m an American English speaker so I don’t know if this is correct, but I’ve observed that British English speakers insert an R sound when a word ending in a vowel is followed by a word beginning with a vowel, though this is only in the spoken form, not the written form. For example: “The data on the card is corrupted” would have an R sound between “data” and “on.” In American English, this transition creates either a clumsy stop, or a muddy transition, depending on the speaker. The R sound smooths the transition.

The “r” thing is largely accent based, sounds south western English, like Cornwall. Most English accents are non rhotic so they tend to drop “r”s in words like water and daughter with a hard r at the end.

Can someone explain why transferring a file causes the computer to hang? From the website it seems that it is because it uses up a lot of CPU time? So a more powerful or multithreaded CPU can get around this? Or is it some sort of blocking issue caused by the kernel module? I know almost nothing about kernel programming.

I’m not familiar with SD cards, but it appears they can be interfaced with SPI, which is then insensitive to timing as you are creating each clock pulse. To bit-bang on SPI, put the data, pulse the clock high, then pulse the clock low, repeat. The endpoint device generally won’t care how far apart the clock high and clock low pulses are, as long as they aren’t faster than the device can handle.
As a result, perhaps the driver could be written in such a way that other tasks can still happen, as long as they aren’t using the parallel port?