Shop OBEX P1 Docs P2 Docs Learn Events
Another SD Question. — Parallax Forums

Another SD Question.

MovieMakerMovieMaker Posts: 502
edited 2008-08-27 23:05 in Propeller 1
OK, guys. I started new thread because this was kinda different.

I have the protoboard on the boebot.· I finally (with the help of my new friends-you guys) got the "OK" back from boebot basic.· I had so much fun last night lighting up several LEDS on several ports, and running the left and right servos as well as the PING servo as well as the PING unit. So indiviually, all of these items work! Yeh!

Now, I guess there is no BOEBOT Basic Code available to run all of these units all together, I have to write that, correct?

My next function that I would like to do is add the SD Card which I have already hardware interfaced to the proto board.· I purchased it from SparkFun Electronics. I did not know that Parallax offered one. It looks like this:

Pin 8 = SD Do
Pin 9 = SD Clock
Pin10 = SD DI
Pin 11 = SD CS
and of course 3.3Volts
and Ground.

At this point I have formated and installed Heartbeat.bin on the SD card.· I just need to know how to test it. How to load it up from the SD card and run the program.·

If was suggested DATA LOGGER, and other SD on USB programs. But, when I load them and run them, nothing really happens.


·

Comments

  • Mike HuseltonMike Huselton Posts: 746
    edited 2008-08-27 16:07
    Jeff Ledger's PropDOS is one solution.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH - Electronics: Engineer - Programming: Professional

    Post Edited (Quantum) : 8/27/2008 4:26:54 PM GMT
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-27 16:09
    OK, I will look into this.



    tongue.gif
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-27 16:09
    I wish I had more time to commit to my Propeller documentation!!

    This is an area I'm working on...
    (Dang day job keeps getting in the way!)

    Thanks for listing the pins you are using! That helps!
    Is there a chance you have a keyboard or TV connected to your
    Protoboard yet?

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-27 16:20
    I hook up my PC through the USB port of the protoboard. I do have the VGA and KB, Mouse kit installed, but plan not to use them to save ports.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-27 16:26
    ah.. ok.. That gives us an idea of exactly what you have..

    If you've already connected the resistors, then you've sorta
    committed the I/O for keyboard/mouse/vga.
    (not a bad thing for your first protoboard setup.)

    I'll fish through my code and see if I can't find a good way to test your setup.
    (something impressive) [noparse]:)[/noparse] Might be later this evening..

    Have you read through the Cookbook file? (listed below)
    I'd encourage you to do composite video (TV) next.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-27 16:27
    There is a sample Basic program included in the BoeBotBasic archive that sort of implements the Roaming with the BoeBot PBasic program. Take a look at it.

    BoeBotBasic has the ability to load and run a compiled Spin program from the SD card. Look at the documentation on the SPIN command. This has been used to make a kiosk program that provides a menu, the user selects a program name from a list, then runs it. If BoeBotBasic is stored in the EEPROM, it'll get loaded and run when the selected program restarts (reboots) the Propeller.

    For this to work properly with larger programs, the SD card has to be formatted with 32K clusters. There was a message posted in your other thread with a link to a discussion on formatting SD cards.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-27 16:31
    By the Boebasic archive, do you mean the folder that boebasic is in? After I load boebasic into the eeprom, how do I load the other program in?

    I also was wondering about the boebasic propellant and how to run it.
  • rokickirokicki Posts: 1,000
    edited 2008-08-27 16:32
    32K clusters? Why not 64K clusters? I don't want to be leading anyone astray by recommending 64K clusters, if there is an
    incompatibility with BoeBotBasic.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-27 16:34
    I can do this. I just read somewhere that if you did not put 32k clusters that it would not work well.

    And, where are your programs that everyone is bragging on? I looked in the objects, but did not see them.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-27 17:06
    32K clusters and 64K clusters will both work. The issue is that the SD card loader only does one large read operation to read the new program in. The entire program (up to 32K) has to reside in one contiguous region of the SD card. The easiest way to ensure this is to require 32K (or larger) clusters on the SD card. Most programs are fairly small, often well under 16K which I think is the default cluster size for most SD cards these days, so the problem doesn't show up. Also, if the SD card is fairly empty and you create a 32K file with two clusters, they will probably be adjacent (contiguous) and the problem won't occur.

    MovieMaker,
    By "BoeBotBasic archive", I'm referring to the .ZIP file that you download from the Object Exchange and the folder that results when you "unarchive" it or when your web browser does that for you.

    I asked you to read the BoeBotBasic documentation on the SPIN statement. It may not be the best documentation, but it should explain things. If not, then say what you don't understand and ask for clarification.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-27 17:24
    OK, Mike. Thanks.
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-27 18:11
    Some people say that you need resistors going to the SD card. DO I need the six 20k pullup resistors with the SparkFun card?
  • rokickirokicki Posts: 1,000
    edited 2008-08-27 18:24
    The specifications say you need them. In practice I've never heard of anyone having troubles without them.
    I always include them.

    Do you feel lucky? Well, do ya?
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-27 18:47
    OK, I got the SD working. The way I tested it was I loaded BASIC and said "FILES" this gave me a directory of the SDcard. Then just to make sure I saved a program to the SDcard. When I tried to run it, it did not run, but when I did a FILES directory search , it showed it. I am a step closer now.

    All of my servos work
    The PING unit works
    The SD card works.
    now , I have to implement the IR and the Soundpal .
    Once I get them working. I have to either find or write code to make it into an autonomous robot. Then I will add my million other items. I have BIG plans for this.

    I hate to reinvent the wheel . If any has the code for prop to boebot that I can just put in and run, that would be great. But, it looks now that I have to write the code myself.

    Anyway, just wanted to update you on my exciting news!
  • jazzedjazzed Posts: 11,803
    edited 2008-08-27 19:02
    Great! We all knew you could do it! Now your wife can bug you about something else [noparse]:)[/noparse] "Honey dues": honey do this, honey do that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-27 19:28
    @MovieMaker: Ya! Welcome to the club!

    (Now it's your responsibility to help someone else.. [noparse]:)[/noparse] [noparse]:)[/noparse] [noparse]:)[/noparse] )

    Fun stuff when it starts doing something interesting isn't it??
    (Now that he's got things working, his wife doesn't have a prayer of "honey do's" <SMIRK>)

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • MovieMakerMovieMaker Posts: 502
    edited 2008-08-27 23:05
    as Elvis said "Thank You, Thank you Very Much!"
Sign In or Register to comment.