Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Chip as Mass Storage USB Device ? — Parallax Forums

Propeller Chip as Mass Storage USB Device ?

TanioTanio Posts: 4
edited 2008-07-21 22:47 in Propeller 1
I would like to implement a Propeller-based device that can act as a Mass Storage Class Compliant USB device.
I currently have a Propeller-based board (uOLED-96-PROP) and a Prop Plug.
Is this possible with a Prop Plug?
Are there examples of how to do this?
Thanks.

Comments

  • BradCBradC Posts: 2,601
    edited 2008-07-16 08:54
    In short .. no..

    To implement Mass Storage you need to be able to use USB_BULK transfers. To use USB_BULK transfers you need to be able to do either HIGH_SPEED or FULL_SPEED and the Prop is only fast enough to do LOW_SPEED.

    You also can't change the usb characteristics of the ftdi chip on the Prop Plug.

    Sorry to rain on your parade [noparse]:)[/noparse].

    You may be able to use one of the other available hardware USB SIO chips out there (in fact I'm _sure_ you could) .. so it's not easy, but with additional hardware it's likely to be possible.

    A bit like having to use an external Ethernet controller chip to get network connectivity.

    MacOS and Windows actually ignore the speed rating of the device and allow you to use USB_BULK for LOW_SPEED devices (limited to transfers of 8 bytes) but your media speed at absolute *best* case is going to be slightly less than 8kb per second, in addition to violating numerous USB specifications. Check my CDC-ACM USB driver for an example (A forum search will bring it up - its not in the object exchange), but don't think its going to be easy (and it _won't_ work on Linux).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • TanioTanio Posts: 4
    edited 2008-07-16 10:01
    What is the best way to communicate between a Propeller and another MPU such as the Atmel AT90USB1287 ?
    Is I2C the right way to go?
    Would SPI work?
    Other?
    Thanks.
  • BradCBradC Posts: 2,601
    edited 2008-07-16 11:11
    How long is your piece of string? (Actually, I've used wet string before between boards)..
    Sure I2C, SPI, Parallel Data Bus, Async, One Wire.. name your poison?

    I'm assuming if you are wanting Mass Storage that you want things to go fast, but you are not really giving us anything to work with..

    I guess you want your propeller to look like a block device to the PC.. why ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • _eel_eel Posts: 3
    edited 2008-07-16 14:09
    How about having the Propeller read/write to a USB mass storage device? Could you have a cog running the USB protocol and have some external circuitry to create the correct voltage levels (I realize FTDI makes chips that do all this)?

    Thanks,

    Stephen
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-16 14:21
    It's not practical. The Propeller can't do the signalling at a high enough speed to be useful and once you have the low level USB protocol done, you still have to add the mass storage layer, then the file system layer. There are existing routines for the FAT16 file system, but nothing for FAT32 or NTFS (all involve licensing issues). This would be a large project and not at all clear that it would fit. At the very least, you would need to have something to handle the high speed low level USB protocol (like the MAX3421)
  • TanioTanio Posts: 4
    edited 2008-07-16 17:18
    > I'm assuming if you are wanting Mass Storage that you want things to go fast, but you are not really giving us anything to work with..

    "Fast" is not important.

    > I guess you want your propeller to look like a block device to the PC.. why ?

    I am making quick and dirty prototype that has a uOLED-96-PROP displaying a slideshow of BMPs. I want to be able to transfer small images to the propeller over USB using a standard USB device type (HID, mass storage, keyboard, mouse). The Prop Plug won't work for me because i want to plug this into a USB host that does not have drivers for serial to USB -- but the USB host does have drivers for HID, mass storage, keyboard, and mouse.

    The Atmel's AT90USBKey is able to look like a HID, mouse, and mass storage. My current plan is to use the propeller to run the display and the AT90USBKey to handle USB communications. If getting one I2C or SPI working is not straightforward with a couple pieces of wet string [noparse];)[/noparse] then I may move over to using the AT90USBKey to drive the display.

    I am open to suggestions. Thanks for the help.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-07-16 17:40
    If you just want to display a slideshow of BMPs, you can always store the BMP's on a SD Card. You can easily interface an SD Card to the propeller and read the BMP's from the card.
  • TanioTanio Posts: 4
    edited 2008-07-16 17:48
    I have the propeller BMP slideshow from micro SD Card working already, thanks to examples from obex.parallax.com

    I want to be able to transfer new images to it over USB from a non-PC USB host that only has drivers for HID, mass storage, mouse, and keyboard... and I don't want to write drivers for this non-PC USB host.
  • BradCBradC Posts: 2,601
    edited 2008-07-16 17:57
    Tanio said...
    -- but the USB host does have drivers for HID, mass storage, keyboard, and mouse.

    HID is certainly doable. Check the "California dreamin'" USB stuff for a quick HID compliant keyboard emulator.

    I _can_ say that HID is a very different beast on Linux, Windows and MacOS and it's quite a pain to be consistent across the platforms.

    It's not incredibly difficult to get a "generic HID" type of device whipped up and talk to it using feature reports.

    Depends on what your "host" is I guess..

    I'm currently doing my development on linux in Virtualbox, with the virtual serial port connected to a unix socket. On the other end of the unix socket is an application that pretends to be a propeller to suck the code out of the Propeller Tool when I press F8. It then loads it into a propeller over a USB HID link.. so yes, it's doable [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-07-18 01:28
    brad, are you using an i2c routine to directly load the eeprom or are you doing a direct ram load ?
  • BradCBradC Posts: 2,601
    edited 2008-07-18 06:01
    Erik Friesen said...
    brad, are you using an i2c routine to directly load the eeprom or are you doing a direct ram load ?

    It can either read/write ram *or* eeprom directly. Can't load eeprom from ram or ram from eeprom though. No space in the cog left.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-07-21 22:47
    I don't know if this quite fits, but I got an email today from·Circuit Cellar, who·is facilitating Microchip's entry into low cost USB solutions by offering free Microchip chip kits and development kits to subscribers. My tentative grasp of what's offered are 8/16/32 bit mcu's from 20 pins to whatever, going from 12mbs to whatever, with built-in·ability to set up as a limited host. Their chips look to run from $3.25 & up, and would, it seems to me, add lots of capability to a Propeller board. Including some fancy ADC's and USARTs.

    MCHP's intro pages on their USB stuff: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2651&param=en534497
Sign In or Register to comment.