Shop OBEX P1 Docs P2 Docs Learn Events
Emulating an SD card — Parallax Forums

Emulating an SD card

Dr_AculaDr_Acula Posts: 5,484
edited 2011-01-29 11:35 in Propeller 1
Could the propeller be programmed to emulate an SD card or USB memory stick?

Why on earth would you want to do such a thing? Well I have got an Android Pad (aka apad, epad, PandaPad) and for $110 including shipping these things are amazing. Surf the web, wifi, 3G, thousands of free apps etc.

But one thing these devices are lacking is input and output. Most have a USB socket, but it is severly limited due to lack of drivers in the Android operating system. It can talk to a keyboard and a USB memory stick, but not a mouse nor a USB to serial device. It can't talk to MIDI nor a USB to parallel adaptor.

So here is an idea. Use a propeller to either emulate an SD card, or a USB memory stick.

I'm not sure which of these would be easier. The SD card might be easier from a software point of view, but then you have to hack a card to get at the wires.

So a USB memory stick might be easier as these just plug in. Would a propeller be fast enough to talk USB and act as a slave device?

This has some more info http://cache.freescale.com/files/microcontrollers/doc/ref_manual/DRM104.pdf

My understanding is that USB slave devices are a lot simpler than host devices. Has anyone done anything like this?

Advice would be most appreciated.

Comments

  • KyeKye Posts: 2,200
    edited 2011-01-28 21:04
    All I can say... is that the code on the computer would be messy... But it would be possible. Inhuman effort would be needed.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-01-28 21:16
    Great!! That means it's obviously going to happen.
  • JT CookJT Cook Posts: 487
    edited 2011-01-29 07:43
    It depends on what you are trying to do.

    If you want the propeller to "act" like an SD card or USB stick, I am sure that is doable, but like Kye says, would be messy. In the end it would probably be better to use a USB stick or SD card just by itself.

    If you are wanting to setup communication between your tablet and the Propeller, then a better route would be to try and find or write USB drivers for serial communication.
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-01-29 09:23
    Don't understand your question. You say the Android does not have enough input and output. Ok ... but most of them have WLAN and/or bluetooth. I currently have a bluetooth-device under investigation, which simply has a serial interface for attaching the propeller.

    So, on Android side you have a GUI which communicates via bluetooth or WLAN with the propeller and the propeller has all this nice devices attached ... the IR diode to switch TV set, stereo and stuff ... it has a RC attached to switch on power ... it can read temperature ...
  • Heater.Heater. Posts: 21,230
    edited 2011-01-29 11:09
    Why not just wire up a real SD card to some adapter that goes into the pad but also tap the connections out to the Prop. Have switch on the chip select to drive it from Prop or pad as required.

    By the way Prop to pad/tablet connectivity has been under discussion on the Android-android thread.
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-01-29 11:35
    Because that means you have to do Linux programming and not Android programming. You need to change the firmware of the Pad then, in detail the SD card driver. I'd prefere to stay in "user-space" of the tablet. If you find the firmware sourcecode of that pad you can do that, but if you stay within the supported interfaces you simply have one big problem less.

    PS: Thanks for a pointer to the Android android thread. Somehow I missed that ... will read through it.
Sign In or Register to comment.