Shop Learn
Memory stick datalogger & basic stamp 2P problems. — Parallax Forums

Memory stick datalogger & basic stamp 2P problems.

CuriousOneCuriousOne Posts: 928
edited 2013-12-05 17:01 in BASIC Stamp
Hello.

I got Basic Stamp 2P24 module, Stamps in class board and bought memory stick datalogger from parallax. Connected them as in datasheet, and downloaded the sample code.

So far, tried two low capacity flash drives, 1GB and 4GB. With both, symptoms are the same, I'm getting the following output:

Memory Stick Datalogger Test V1.1
Synchronizing...
Checking for USB Flash drive...
Drive D: Ready...
Random Number (Seed) = 7618
Error reading the seed file -- Halting execution!


I've double checked the code and wiring, everything is OK. The power is also OK - I'm using AC power supply.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-12-04 08:01
    The Memory Stick Datalogger sample code uses the SERIN and SEROUT statements to talk to the Datalogger and those statements are Stamp model dependent. The Baud constant is different for the BS2 and the BS2p. Make sure you've changed the Baud constant in the sample code. For the BS2, it's 84. For the BS2p, it's 240.
  • CuriousOneCuriousOne Posts: 928
    edited 2013-12-04 10:42
    So basically, if I would insert plain BS2 module, everything should work properly?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-12-04 12:02
    Well yes, but you can use the BS2p if you change the affected command values accordingly. Mainly the baud rate value.
  • CuriousOneCuriousOne Posts: 928
    edited 2013-12-05 11:54
    Yes, I've installed BS2, reflashed and everything now works just fine.

    However, why there's no sample SIMPLE code, which will look like:

    To read file from flash disk, use this code, to write file to flash disk, use this code and so on.

    Why there's only one example, and complicated one? from the first look, it creates expression that it is necessary to use random seed to work with adapter.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-12-05 17:01
    It's really not that simple. In order to write to the drive a number of values need to be calculated specifically for the exact number of bytes you're writing. This varies from one program to the next so the example shows one way to do it and you can get the details from the firmware documentation on how to make changes.
  • And almost 10 years passed :smiley:
    Demo code seems to be gone from Parallax website
    but I still have these laying around.
    Any place where I can download it?

Sign In or Register to comment.