Shop OBEX P1 Docs P2 Docs Learn Events
Passing Variables to Stamploader? — Parallax Forums

Passing Variables to Stamploader?

PaulPaul Posts: 263
edited 2005-07-12 20:15 in BASIC Stamp
·Would it be possible to set a text variable to some value from the STAMPLOADER program? Here's the senerio: I have a Stamp program that is used in many models of our equipment and I would like the Stamp program to know what model it is and would be able to report the model number to the user or even run different parts of the program. Currently each model gets its own compiled version the only difference in all the programs is the 4-6 character model number.
·By entering this value our production folks would set the model number whenever they programmed the units. ( And I wouldn't have to maintain all these programs!)
·I know this is more of an ARGV,ARGC thing from my C programming dayz but it was so handy.

Is it possible to build a modified STAMPLOADER like this from the Tokenizer software?

Thanks, Paul
·

Comments

  • Philip GamblinPhilip Gamblin Posts: 202
    edited 2005-07-12 13:40
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-07-12 14:50
    The purpose of the StampLoader program is to download a new program image to your Stamp. If you don't compile for stand-alone operation, your folks could select from the various images (you've precompiled).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • PaulPaul Posts: 263
    edited 2005-07-12 16:40
    Phillip: Stache _might_ work. I have a 'BS2P Clone program' that is similar but more primitive I will look into modifing it.

    Jon: Yes, Im in the pre-compiled .obj rut today. I have 20 or so .obj files I have to maintain. If we add a feature each program has to be recomplied and retested. ugh.

    So Lets see, if I have the image in the .obj file, I could put dummy text in the area that goes into the DATA space. Right _before_ running StampLoader I could do a search and replace on (a copy of) the object file.

    Search for "XXXXXX", replace with "1234AB"...or whatever the guy loading the program puts in there. Once the program is loaded it would check the DATA area for the new Model Number...

    Unfortunately if the .obj has a CRC (or similar) check this probably won't work...

    Thanks for the input guys! As always the best support around!
    Paul
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-07-12 18:19
    Is there another way -- in the design -- to deal with all the variability? A configuration jumper (or more) on the board to select features?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • PaulPaul Posts: 263
    edited 2005-07-12 20:10
    Wow, thats uncanny. I do have 5 pins on the 74HC165 unused _and_ with pull ups _and_ brought out to a connector. Thats 32 different ways to identify the unit/model with properly placed jumpers. Amazing!
    Thanks!!!
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-07-12 20:15
    Yes, the folks in the office frequently refer to me as "Jon the Amazing" ... "the Amazing Ding-Dong!" No matter, I'm glad to be of assistance.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.