Tokenizer
I am looking for help with the Pbasic Tokenizer. So far, working through the example, I have got past the reset sequence and identified the Stamp as a BS2. When I try to obtain the firmware version I get no response. The PDF says to send "0" (which is also the end of session character) to retrieve the firmware version of a BS2.
Any help would be appreciated.
Jeff T.
BTW the Parallax IDE reports a Basic stamp 2,·firmware v1.0
Any help would be appreciated.
Jeff T.
BTW the Parallax IDE reports a Basic stamp 2,·firmware v1.0
Comments
You might find some useful info {here}.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Interesting link! I've got a situation where a user might need to program a BS2pe system whose programming port is inaccessible (due to mounting location) but which has a communications link using different pins. It occurred to me that one could put a small monitor/loader program in slot 0, which could then handle the uploading, via the comms link, to a different slot and begin execution there. Have you ever done anything like that?
-Phil
Your "clone" example Tracy reads from one stamps eeprom to another, I would say it would be just as easy to read from other memory media such as a thumb drive and use a stamp as the programming interface, all that would be needed for field programming would be the usb stick, I really must try that sometime soon.
Unfortunately I havn't yet been able to get past the identify stage. The four sequences of programming the stamp are Reset-Identify-Program-Quit. The help file says once past Reset everything is standard serial communication. I believe that the Reset was succesful as I get the following response from the Identify sequence I am sending "B" recieving 190 (correct) sending "S" recieving 173 (correct) sending "2" recieving 206 (correct) sending 0 and getting no response (??) , after the 2.3 sec delay without stamp serial input my old program runs (which again verifys the Reset)
I am using Visual Basic as my IDE , and I have "pace" timers between each serial command that I have tried different values with. I have stopped trying to write data to the eeprom until I can get the Identify sequence to work properly. I am not disheartened and know I will get it eventually.
Jeff T.
EDIT later today I will try another PC as a "sniffer" on the serial line.
Post Edited (Unsoundcode) : 5/20/2007 7:54:04 PM GMT
The Stache module is an SX chip, programmed tospoof either a PC or a Stamp for transferring programs between them. It stores the programs on its internal eeprom, but you're right, once the programming algorithm is defined, the actually data could come from anywhere. (But it does take some effort to get it working to both capture the tokens from a PC and to deliver the tokens to a Stamp!)
Phil,
Yes, I've used a reprogramming scheme similar to the one you suggest, elaboration on the note at, www.emesys.com/BS2clone.htm#STORE. A trigger invokes a loader program that brings in data and STOREs it in another slot. It has to transmit bytes slowly or with a pacing handshake, and it has to be covered by a CRC or other means to be sure that the new program is really correct before running it. The communication channel is probably unreliable too, as well as the system being inaccessible. No room for error.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Now I am getting a return value when I query the version # , I don't want to get too excited because I need to determine whether it actually is the version number.
The help file says the version number is BCD coded, the return value is 16 (10000) which I guess could be version one (which is what Parallax IDE identifies in my case).
One thing that makes me think it may be right is that I have "Identified" in two different ways, first I sent "BS2",0 which is identify without an end off session character and the stamp reset and ran the old program. Secondly I sent "BS2",0,0 which is identify with end of session and the stamp ID'd but the old program didn't run.
I thought that was progress and a logical reaction to the end of session character.
Next step data transfer
Jeff T.
The version# for a BS2 does return 16, if I had read Tracy Allen's paper a little closer first time around I would have known this earlier. The paper is a good compliment to the Parallax manual.
Once you get past the Identify stage things are fairly straight forward. On its own its not of much use but I intend to try and devlop it with the Parallax tokenizer library which was my original intention.
Having said that, seeing that its possible to program one stamp from another it opens up a whole new world of ideas and I would like to develop something along the lines of the Stache.
Jeff T.