Shop OBEX P1 Docs P2 Docs Learn Events
Vincullum or DOSonChip? — Parallax Forums

Vincullum or DOSonChip?

Spork FrogSpork Frog Posts: 212
edited 2007-05-04 22:49 in General Discussion
I'm looking for a way to add mass storage to my Propeller project easily. I know that there have been routines to interface to an SD card directly, but I think I'd rather stick with one of these, mainly because they can take advantage of some of the more advanced features of the FAT filesystem.

I don't care what kind of storage they use. (I know Vincullum=usb stick and DOSonChip=sd card.)

Anyone have experience with either and say which they think is better?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-04 21:59
    I only have a little experience with the DOSonChip and slightly more with the Vinculum. From my standpoint, there are problems with both of them, but the Vinculum is faster and better documented. I put together some test routines for the Vinculum that use SPI mode:
    '' Test program for Vinculum and Propeller Demo Board
    
    CON
      _clkmode  = xtal1 + pll16x
      _xinfreq  = 5_000_000
    
      RESET     = 0                   ' Vinculum /Reset
      SPI_CLK   = 1                   ' Vinculum Clock
      SPI_DATA  = 2                   ' Vinculum Data
      SPI_CS    = 3                   ' Vinculum Select
      EOL       = 13                  ' End of line (return)
    
    OBJ
      key : "keyboard"
      dsp : "tv_text"
    
    PUB start | t, s
      dsp.start(12)                   ' TV pin block for Demo Board
      key.start(26,27)                ' Keyboard pins for Demo Board
      dsp.str(string("Vinculum Test Program",EOL))
      outa[noparse][[/noparse]RESET]~                    ' Reset device
      dira[noparse][[/noparse]RESET]~~
      outa[noparse][[/noparse]SPI_CS]~                   ' Select normally low
      dira[noparse][[/noparse]SPI_CS]~~
      outa[noparse][[/noparse]SPI_CLK]~                  ' Clock normally low
      dira[noparse][[/noparse]SPI_CLK]~~
      dira[noparse][[/noparse]SPI_DATA]~                 ' Data initially input
      outa[noparse][[/noparse]RESET]~~
      s := 0
      waitcnt(clkfreq / 4 + cnt)      ' Wait for 250ms initialization
      repeat
        if s == 0                     ' Buffer not full in Vinculum?
          s := key.key                ' Look for typed character
        if s > 0                      ' Character pending?
          if (transfer(false,false,s) & 1) == 0
            dsp.out(s)                ' If transmitted ok, echo to display
            s := 0                    ' Allow another
        if ((t := transfer(true,false,0)) & 1) == 0
          t := t >> 1 & $FF           ' If character read from Vinculum
          if t & $7F => " " or t == EOL
            dsp.out(t)                ' Display all displayable characters
          else
            dsp.out("{")              ' Or display hex code of others
            dsp.hex(t,2)
            dsp.out("}")
    
    PRI transfer(read,status,data) | i, mask
    '' Transfer data to/from Vinculum USB Host in SPI mode
      data := $800 | $400 & read | $200 & status | data << 1
      mask := $800
      outa[noparse][[/noparse]SPI_CLK]~~                 ' At least one clock prior to selecting
      outa[noparse][[/noparse]SPI_CLK]~
      outa[noparse][[/noparse]SPI_CS]~~                  ' Select chip
      repeat i from 1 to 12           ' Start, direction, address, 8 data, status
        dira[noparse][[/noparse]SPI_DATA] := i < 4 or i < 12 and not read
        outa[noparse][[/noparse]SPI_DATA] := (data & mask) > 0
        result |= mask & (ina[noparse][[/noparse]SPI_DATA] > 0)
        outa[noparse][[/noparse]SPI_CLK]~~               ' Data valid on positive edge of clock
        dira[noparse][[/noparse]SPI_DATA]~               ' Let data line float after hold time
        outa[noparse][[/noparse]SPI_CLK]~
        mask >>= 1
      outa[noparse][[/noparse]SPI_CS]~                   ' Deselect chip
      outa[noparse][[/noparse]SPI_CLK]~~                 ' At least one clock after deselecting
      outa[noparse][[/noparse]SPI_CLK]~
    
    
  • UnsoundcodeUnsoundcode Posts: 1,530
    edited 2007-05-04 22:49
    Just out of interest you can have the best of both worlds with the Vdrive and this little gadget.

    http://www.cyberguys.com/templates/searchdetail.asp?productID=9886

    Jeff T.
Sign In or Register to comment.