How code is uploaded
Miguel Angel
Posts: 15
I want to know about the process which transform the legible code to BS code (uploaded code to BS).
1) a commented code is converted in a not commented code when upload?
2) space between lines are deleted when upload?
3) all others question about make better use of the memory when I try to do many things with BS
I'm using a Time clock kepper for obtain hour of test
a temperature sensor (for test temperature)
a memory stick datalogger for save the data tested
and left me
a DAC (digital-analogg converter) for test voltage
and XXXX (don't remenber) for turn on/off a relay.........
I need more memory and maybe more PIN,,,,
1) a commented code is converted in a not commented code when upload?
2) space between lines are deleted when upload?
3) all others question about make better use of the memory when I try to do many things with BS
I'm using a Time clock kepper for obtain hour of test
a temperature sensor (for test temperature)
a memory stick datalogger for save the data tested
and left me
a DAC (digital-analogg converter) for test voltage
and XXXX (don't remenber) for turn on/off a relay.........
I need more memory and maybe more PIN,,,,
Comments
In terms of making good use of memory ...
String constants are copied directly into the compiled code, so output statements including DEBUG statements tend to take a lot of memory, especially when there are long strings involved.
If you haven't looked at it, www.emesystems.com has a lot of information about Stamp programming including estimates of execution time for various statements, multiple precision arithmetic, and many other topics. Browse the website.
Any variable used is replaced by an address parameter in the Byte-code tokens. Destination addresses are also replaced by an address parameter.
Keys to making best use of the limited resources: Create 'temp' variables for subroutines to manipulate so you can re-use RAM. Only save what information you NEED to save at any one time. Use SERIN/SEROUT or SHIFTIN/SHIFTOUT to minimize use of pins.