Programitcally Sending Serial Commands
Keith Myers
Posts: 3
I know the basic stamp is limited on memory, so I got to thinking...
Would there be a way to only send fractions of a program to the stamp "Behind the Scenes". Any examples (VB Express 2006) Would be great
Would there be a way to only send fractions of a program to the stamp "Behind the Scenes". Any examples (VB Express 2006) Would be great
Comments
I am not exactly sure what you have in mind as 'fractions of a program'. You would have to create a 'higher command language' and use that with the communications. PBasic would pretty much interpret what you send.
In some ways, you would be mimicing what PBasic already does.
Alternatively, there is a 'field programmer' that can change between several programs without the aide of a PC.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
For this to work, your run-time environment must support it. The BS2 run-time environment does NOT support this. The BS2p chips, with their larger eeprom, do support a multi-page environment, though.
And it makes sense that it does not support it. Why would you purchase a nice, small, reliable, real-time module, only to hang additional memory off of it to 'swap in' code overlays? Who could afford to waste that much time?
Oh, and having said that, since I believe the BS2 can write its own eeprom memory, in theory this WOULD be possible.· In practice, it might be amazingly awkward.
Just a bit of a correction. Any of the PBASIC Stamps based on the Ubicom SX chips are capable of multi-bank programming. This includes, but is not limited to, the BS-2p series, as the BS-2SX and BS-2e are also capable of being multi-bank programmed.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
BUT, and this is important, it must be complete programs of 2KB, not just bits of them.
Writing the PC-based code, though... Sorry, but I don't use VB.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
Visual Basic(GUI)
> User Selects Option
>Send PreTokenized code "Behind the secenes"
·
Just keep the 'master' program which does the receiving and starting of the other programs in slot 0.
Of course, if you don't know in beforehand what the 'pretokenized code' will be, then your VB program will have to assemble it into a source, based on the user's selections, and feed it through the tokenizer DLL first. A bit more difficult, but still doable.
You may want to add a bit of logic in your system(either an option sent from the VB program, or in the program in Slot 0) which rotates which slot the new program is loaded into.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax