Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp programming Basic Stamp — Parallax Forums

Basic Stamp programming Basic Stamp

georgiosgeorgios Posts: 4
edited 2008-05-25 22:27 in BASIC Stamp
Any ideas on how to programm a basic stamp by copying the memory of another basic stamp to it?
I have a device with basic stamp and I want it to be able to transfer the code to other identical devices
that haven't been programmed.smurf.gif

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-23 22:34
    You can't really do it. It's possible to download a very small program to each of the Stamps and these small programs can read what's left of the EEPROM and transmit it to the other Stamp where the small program there can write it to what's left of the EEPROM, but there's the small part of the EEPROM that gets overwritten by the transfer programs and you can't get to that. This is deliberate to make it harder for someone to steal the program from a Stamp.
  • georgiosgeorgios Posts: 4
    edited 2008-05-24 16:24
    thanks, you saved my time from trying doing that
  • iamdenteddiskiamdenteddisk Posts: 66
    edited 2008-05-25 22:14
    reguardless of advice on this I would still push for the ring on this besides that the advice was'nt that its impossible but that - it will work only through creative programing -but are you the guy to do it?
    these two questions must be answered to do it with any controler
    dose it support string variables,yes
    will it change execution based on those variables,yes
    so why wont it work,actualy the hardest part is linking the 2
    on all BS2's& up the pbasic is tokenized code not compiled binary's like a pc
    you cant change the line's in the original code its in eprom but if you structure your code to self modify its execution based upon data input "like a simple push button prg example" meaning if the code is allready there it can be set to execute "if condition exist" and the host board simply sends variable data to change behavior of its guest and the "self modifing code"is on the guest board,or both can be both host and guest like "handshakeing" conversation ,Now in order for a controlor to execute it must be aware of the code that is on it <simply load first bit in program memory to a string variable pass it ,once a confirmation is recieved compare it to the end program token if it isnt then increment starting bit by 1bit and repeat ,on end echo branch back to runing state ,-the only problem is,the guest must have a program already on it to know what to do with the passed variables ,so the guest has less room for new program but still you can page memory on it and have the modify section be a seperate lable ,good luck
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2008-05-25 22:27
    This may or may not be relevant to what you are trying to do, but if you set up one Stamp in advance with the with the subroutine described at
    www.emesys.com/BS2clone.htm
    then that first stamp can in fact copy itself into another stamp.

    Another angle, the Stache is a small field programmer for Stamps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.