Shop OBEX P1 Docs P2 Docs Learn Events
Micro SD communication — Parallax Forums

Micro SD communication

UntelUntel Posts: 27
edited 2009-08-20 16:20 in Propeller 1
Just wonder if anyone has ever try to conect an sd card, control by a propeller (demo board ,or else), on a pc using the usb port so that Windows explorer can see it, and also read or write it ?

Thanks for helping
Regards to all
N.R.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-18 17:52
    It would be very very difficult to do.

    The USB port used by the Propeller is not a general purpose USB port. It only can be used for a serial port and Windows Explorer has no way to see it. It might be possible to write an I/O driver for Windows that would pretend to be a networked disk drive to Windows, but would actually talk to the serial port and send commands over the serial port to the Propeller that would be interpreted by a Propeller program. You're talking about a lot of work done by someone expert in writing I/O drivers for Windows.

    Much easier would be to use an existing program like Windows Kermit and write a Kermit client for the Propeller. There are already simple Kermit clients for the Propeller that could be "fancied up" to use newer versions of the SD card drivers that support subdirectories and FAT32.
  • Agent420Agent420 Posts: 439
    edited 2009-08-18 18:15
    I'm guessing the OP is thinking along the lines of a usb plug & play type project, where no software is needed.· As Mike mentioned, that is quite a complex task.

    It might be possible to program the Propeller to emulate a usb device in software, but that would not be for the inexperienced coder.· But for reference I would read through this project using an avr chip as it explains some of the data protocols involved.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-18 18:29
    The Propeller can only emulate very simple USB devices in software, like a keyboard, mouse, or joystick. It can do the same limited USB as the above referenced Atmel appnote. It cannot emulate a mass storage device. It's simply too slow and doesn't have enough memory for the code needed. All of this has already been discussed at length before.

    Post Edited (Mike Green) : 8/18/2009 6:34:51 PM GMT
  • UntelUntel Posts: 27
    edited 2009-08-18 21:19
    Actually the OP(?) is not exactly thinking of plug and play, witch is kind of simple to implement using a spi/i2c usb bridge.
    The full control of the communication as to be manage under Propeller system via a simple UI giving access to the SD locally or from the PC via the USB port. This was done with the bridge (plug and play) solution but, I just try to figure out if I could reduce the hardware bill going software.

    Considering Mike's reply, I can conclude that the hardware is the simpless solution.

    Thanks for helping

    Regards to all
    N.R.
  • Agent420Agent420 Posts: 439
    edited 2009-08-19 17:18
    I think? we are talking about the same thing, but using different descriptions?· I was talking plug & play using nothing but the Propeller; no addtional hardware or software on the pc, no faux 'serial port' usb connection.

    Anyway, I'm surprised something similar to the AVR project above wouldn't be possible on the Prop with all of it's parallel processing power...· they are using a lowly Tiny2313 AVR running at 12Mhz for their usb in software solution, can't the Prop could do something like that?· What about all that 160MIPS?


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-19 17:32
    Have you read the description of the AVR project? They only implement low speed HID. This is the same thing that's already been done with the Propeller. The difficulty is in implementing full speed USB and devices other than HID (keyboards, mice, joysticks) and you have to have full speed USB for pretty much anything other than HID (human interface devices). Neither the AVR nor the Propeller have the speed to do everything in software at anything than low speed. You at least need some external low level USB interface hardware to do anything else (like the MAX3421E).

    Post Edited (Mike Green) : 8/19/2009 5:38:30 PM GMT
  • heaterheater Posts: 3,370
    edited 2009-08-19 17:44
    Actually reading the first post again I take it a different way. Like so:

    1. PC has a USB SD card reader plugged in.
    2. Where the SD card should be in the reader it is not. Instead the SD interface is somehow connected to Prop pins.
    3. The SD card is connected to some other Prop pins.
    4. Prop just acts as a pass through.

    Bingo you can program the SD with Prop as a "pass through", without having to fiddle around swapping those dinky micro SDs.

    Now that wastes pins and may not work anyway. So why not sit the Prop on the SD to SD adapter lines. Arrange that when plugged to a PCs USB the Prop is passive. When not plugged to the PC the prop can use the SD.

    So now I can build a USB Prop gadget that I can plug to my PC for reloading, reconfiguring etc without swapping cards around.

    That's not such a daft idea is it ?

    How do we get the Prop to go passive when the USB SD interface is active ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Agent420Agent420 Posts: 439
    edited 2009-08-19 17:48
    Mike Green said...
    This is the same thing that's already been done with the Propeller.
    Perhaps I have overlooked it, but I just searched and did not see any usb protocol objects in the exchange... what projects are you referring to?

    As for the AVR project, I have incorporated it in several projects.· Granted it is low speed, but one of the benefits is that it is a direct usb device that windows recognizes.· You are not limited to HID classes, it can perform digital IO and ADC/DAC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • heaterheater Posts: 3,370
    edited 2009-08-19 17:54
    You are looking for this http://forums.parallax.com/showthread.php?p=675656

    It's based or at least inspired by the AVR USB project if I remember correctly.

    I had a play with avr-usb a long while back, it's pretty neat I must say.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-08-19 22:28
    There is some really neat ideas coming out of this thread but I am really confused about what is actually being required by Untel.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, RamBlade, TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • BradCBradC Posts: 2,601
    edited 2009-08-20 00:06
    Agent420 said...
    Mike Green said...

    This is the same thing that's already been done with the Propeller.


    Perhaps I have overlooked it, but I just searched and did not see any usb protocol objects in the exchange... what projects are you referring to?



    As for the AVR project, I have incorporated it in several projects. Granted it is low speed, but one of the benefits is that it is a direct usb device that windows recognizes. You are not limited to HID classes, it can perform digital IO and ADC/DAC.

    You won't find it in the object exchange. I wrote it and I plan to dual license the code under the GPL and a more restrictive commercial license. The OBEX is only for MIT licensed code.
    You will find it attached to a post in the forums though. I use it to simulate a CDC-ACM compliant serial port here, but you can pretty much do with it what you want. It's far more standards compliant than the AVR stack as we have more processing horsepower to play with.

    One day (when I get some time) I'll get it cleaned up and posted on a web page somewhere.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lt's not particularly silly, is it?
  • UntelUntel Posts: 27
    edited 2009-08-20 04:13
    Hi,
    To make things clear:

    The sd card is actually enclose in a unit control by a propeller chip.
    There is a 4x4 keyboard on the unit alowing the user to manage the files on the local(unit) sd.
    One key of the unit keyboard tranfer the full control of the sd to Windows explorer.
    In other words, the sd card in the propeller unit act then as if it was a usb BOM FLASH DISK plug on the PC.

    I hope i have made the idea clear
    (sorry for my english)
    Thanks again
    regards to all from UNTEL
  • Forest GodfreyForest Godfrey Posts: 38
    edited 2009-08-20 16:20
    I'm actually working on something with the same requirements. The route I'm going down is to attach a PIC18f2455 to the Prop. The PIC has software from Microchip that you can freely download that implements a USB Mass Storage controller. I'm either going to have the Prop transfer the data to the Pic, or rig up a way for one or the other to have direct control over the SD card.
Sign In or Register to comment.