Shop OBEX P1 Docs P2 Docs Learn Events
PropBoe with lots of storage — Parallax Forums

PropBoe with lots of storage

ratronicratronic Posts: 1,451
edited 2012-05-05 10:19 in Propeller 1
I had ordered a 32gb uSD card for something else but gave it a try using Kye's driver on the PropBoe. I was going to display bytes free but the Prop can't easily display a number that high. The card came preformatted with fat32 and has 31,902,400,512 bytes storage. Attached is a picture of the Parallax serial terminal after running this program. I had already transfered some .txt files to it on my computer. That is a lot of storage and that card found a new home with my PropBoe!
Con                                                      
                                                         
  _CLKMODE = XTAL1 + PLL16X                              
  _XINFREQ = 5_000_000
  DO  = 22                              
  CLK = 23                             
  DI  = 24                              
  CS  = 25                              
       
Var         
    
Obj
  io : "parallax serial terminal"  
  sd : "sd-mmc_fatengine"
        
Pub Init | a, b, c
  io.start(115200)
  waitcnt(clkfreq*2+cnt)
  if sd.fatEngineStart( DO, CLK, DI, CS, -1, -1, -1, -1, -1)
    sd.mountpartition(0)
    io.str(string("Partition mounted!",13,13))
  else
    io.str(string("Problem starting fat engine",13))
    error
  a := sd.partitionusedsectorcount("F")
  b := sd.partitionbytespersector
  c := sd.partitionfreesectorcount("F")  
  io.str(string("File system                    ",11))
  io.str(sd.partitionfilesystemtype)
  io.str(string(13,"Used partition sectors         ",11))
  io.dec(a)
  io.str(string(13,"Bytes per partition sector     ",11))
  io.dec(b)
  io.str(string(13,"Current free partition sectors ",11))
  io.dec(c)
  io.str(string(13,13,"Total bytes used               ",11))
  io.dec(a * b)
  
  sd.unmountpartition
Pub error
 
  repeat
1024 x 556 - 32K

Comments

  • smithdavidpsmithdavidp Posts: 146
    edited 2012-05-05 03:38
    Ummmmmm Dave.......there may be a glitch with this file. I have a 4 gig card installed and it is reporting that I have 8 gig (rounded up) of memory space.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-05-05 04:23
    I don't know, D Rat's numbers seem to work out for a 32GB formatted card.

    (512 bytes per sector * 62283712 sectors) + 13139968 bytes = 31902400512 /1024 / 1024 / 1024 = 29GB

    What numbers did you get - bytes per sector, used partition sectors, free partition sectors?
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-05-05 04:58
    This is what I got:

    Numbers.JPG
    314 x 138 - 18K
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-05-05 05:14
    (512 * 7841664) + 65536 = 4014987264 / 1024 / 1024 / 1024 = 3.73 GB - seems reasonable for a 4GB card
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-05-05 06:21
    Don't mind me..... I got up too early this morning. I re-did the math and figured that out. Nice catch.
  • ratronicratronic Posts: 1,451
    edited 2012-05-05 06:59
    The way I was going to calculate total storage bytes is to add used and free sectors, multiply that with bytes per sector but the Prop can't easily display that high of a #. Using that method I calculate smithdavidp has 4,014,997,504 total byte's storage on that partition on the card.
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-05-05 09:19
    It works better then anything else I have seen so far.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-05-05 09:53
    Soooo, now that you have all that storage......whatcha gonna do with it???Download GPS maps to you robot so it can go anywhere in the USA?? :lol:
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-05-05 10:19
    I actually need more space. Now that I know it will handle a 32 gig card I'm gonna have to go get one. Mine will be filled with lookup columns and WAV files. Yes, I am trying to teach my Boe Bot to talk to me. lol (although the mapping idea for the house doesn't sound like a bad idea) lol
Sign In or Register to comment.