Program Memory
Archiver
Posts: 46,084
I have a few questions regarding the EPROM space that a program
occupies.
* Do REM stattements occupy EPROM space?
* Do variable and subroutine labels occupu more EPROM space if
they are long?
Regards,
Dwain
occupies.
* Do REM stattements occupy EPROM space?
* Do variable and subroutine labels occupu more EPROM space if
they are long?
Regards,
Dwain
Comments
>I have a few questions regarding the EPROM space that a program
>occupies.
>
>* Do REM stattements occupy EPROM space?
>* Do variable and subroutine labels occupu more EPROM space if
> they are long?
>
>
>Regards,
>
>Dwain
Hi Dwain -
Neither REM statements nor LABELS consume EPROM space in the STAMP memory.
It is therefor appropriate to comment your programs freely, and use
meaningful names for better documentation and easier program readability.
Regards,
Bruce Bates
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
in your source code. They are tools to make it easier to document your code
and to mark or jump to other code pieces without knowing where they actually
reside in memory.
If you can come back to a program you wrote 6 months or a year ago and
easily figure out what it does, your documentation is good.
Original Message
> >I have a few questions regarding the EPROM space that a program
> >occupies.
> >
> >* Do REM stattements occupy EPROM space?
> >* Do variable and subroutine labels occupu more EPROM space if
> > they are long?
> Neither REM statements nor LABELS consume EPROM space in the STAMP memory.
> It is therefor appropriate to comment your programs freely, and use
> meaningful names for better documentation and easier program readability.
daweasel@s... writes:
> If you can come back to a program you wrote 6 months or a year ago and
> easily figure out what it does, your documentation is good.
>
How true!!!!!!!!
When I write even the smallest programs I often thought I don't need to
document it. My reasoning was, heck, I am the guy who designed the hardware
and writing the software. Don't need no stinkin documentation!!
How wrong I was!!!!!!!!! I now thoroughly document all programs. It is time
well spent!!!!!!!
[noparse][[/noparse]Non-text portions of this message have been removed]
I've filled it up and have shortened my program as much as possible. I know
nothing about the matter, as I'm a complete newbie.
Many thanks, John
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
[noparse][[/noparse]Non-text portions of this message have been removed]
Go to using a bs2e, which will give you 8 x the program space, its really
quite easy, and the module goes straight into the same ic socket as the bs2,
same pinout etc.
Cheers.
Chris
Original Message
From: "John Baker" <johnbaker_erie_pa@y...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, August 05, 2003 10:46 AM
Subject: [noparse][[/noparse]basicstamps] Program memory
>
> Can anyone please tell me if it's possible to add more program space to a
BS2? I've filled it up and have shortened my program as much as possible. I
know nothing about the matter, as I'm a complete newbie.
>
> Many thanks, John
>
>
>
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Thanks for the reply.I have a BS2e and SX, Parallax says they have 2x16K. My
memory map still shows that the program space is %99 full. How do I go about
using the extra memory?
Cheers for more help!
Chris Anderson <fuel@b...> wrote:
Hey John,
Go to using a bs2e, which will give you 8 x the program space, its really
quite easy, and the module goes straight into the same ic socket as the bs2,
same pinout etc.
Cheers.
Chris
Original Message
From: "John Baker"
To:
Sent: Tuesday, August 05, 2003 10:46 AM
Subject: [noparse][[/noparse]basicstamps] Program memory
>
> Can anyone please tell me if it's possible to add more program space to a
BS2? I've filled it up and have shortened my program as much as possible. I
know nothing about the matter, as I'm a complete newbie.
>
> Many thanks, John
>
>
>
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and Body of
the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
[noparse][[/noparse]Non-text portions of this message have been removed]
have a look at the "run" command.
With the sx and e, you have 8 slots of program space, where the bs2 has one.
If you check the memory map with the e or sx, you will see that there are 8
memory maps there, not just one.
The 8 slots in an e or sx are 0,1,2,3,4,5,6,7
Say you have some code which does different things depending on the state of
pin 5, and if pin 5 is high you want to run the program in slot 1....
'In slot 0
if in5 = 0 then stayinslot0
run 1 'makes the program go to slot 1, and run the program in
there.
stayinslot0:
'code here for slot 0 (perhaps your bs2 code)
You can pass a variable between slots by using the 'put' and 'get' commands
like this...
'in slot 0....
put 0, 27 'puts the value 27 into RAM location 0
run1 'sends the program off to run the code in slot 1.
'in slot 1...
myVar var byte 'declare a byte variable
get 0, myVar 'get the value in location '0' in RAM, put it into
myVar
debug dec myVar 'will show "27" in the debug screen
You need to declare variables etc at the beginning of each slot, but you
only need to declare 'dirs' (inputs / outputs) in slot 0.
There are 63 (0-62) usable bytes of ram with e and sx, BUT, you should have
a good read of the help manual because you need to set up a $stamp directive
at the start of each page (slot) of program. You need to do this for the
whole 8 pages, even if you are only using 1 or 2 slots etc. Once you get the
hang of it, you will be able to do heaps more with the stamp.
The 8 slots open up enormous possibilities, and give a huge amount of
program space. Best thing ever happened was Parallax releasing the bs2e / sx
/ p.
In my application, the stamp starts by jumping to slot 7 and loading all
user changeable system settings from Eeprom, and puts them all into ram.
Then it goes to slot 0 and waits for some user input. Depending on the user
input, it then runs other slots, with ibutton comms in 1 slot, extra memory
access (external Eeprom) in one slot, time date setting and display to lcd
in one slot, keypad input in one slot. I have all 8 slots at least 80% full
of code, and it is very simple to jump / pass values between them.
Cheers,
Chris
Original Message
From: "John Baker" <johnbaker_erie_pa@y...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, August 05, 2003 12:41 PM
Subject: Re: [noparse][[/noparse]basicstamps] Program memory
> Dear Chris,
>
> Thanks for the reply.I have a BS2e and SX, Parallax says they have 2x16K.
My memory map still shows that the program space is %99 full. How do I go
about using the extra memory?
>
> Cheers for more help!
>
>
>
> Chris Anderson <fuel@b...> wrote:
> Hey John,
> Go to using a bs2e, which will give you 8 x the program space, its really
> quite easy, and the module goes straight into the same ic socket as the
bs2,
> same pinout etc.
> Cheers.
> Chris
>
>
>
Original Message
> From: "John Baker"
> To:
> Sent: Tuesday, August 05, 2003 10:46 AM
> Subject: [noparse][[/noparse]basicstamps] Program memory
>
>
> >
> > Can anyone please tell me if it's possible to add more program space to
a
> BS2? I've filled it up and have shortened my program as much as possible.
I
> know nothing about the matter, as I'm a complete newbie.
> >
> > Many thanks, John
> >
> >
> >
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject and
> Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
specifics of multi-bank programming and a method of moving data
parameters between program slots. GOTO www.parallax.com and navigate
the menu like this:
Parallax >> Downloads >> Nuts & Volts Columms
Click on Volume 3 and download column #87: Multi-Bank Programming.
-- Jon Williams
-- Parallax
Original Message
From: John Baker [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=FXcdY3mb8MXLu3imchcuRw55mYmaCKO3-l0jmo6Q81C36-KoaiaHCfvzBbAiVI3aSYD3nqxKMi3APjVBq7Wudyogt3w]johnbaker_erie_pa@y...[/url
Sent: Monday, August 04, 2003 11:42 PM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] Program memory
Dear Chris,
Thanks for the reply.I have a BS2e and SX, Parallax says they have
2x16K. My memory map still shows that the program space is %99 full. How
do I go about using the extra memory?
Cheers for more help!
Chris Anderson <fuel@b...> wrote:
Hey John,
Go to using a bs2e, which will give you 8 x the program space, its
really quite easy, and the module goes straight into the same ic socket
as the bs2, same pinout etc. Cheers. Chris
Original Message
From: "John Baker"
To:
Sent: Tuesday, August 05, 2003 10:46 AM
Subject: [noparse][[/noparse]basicstamps] Program memory
>
> Can anyone please tell me if it's possible to add more program space
> to a
BS2? I've filled it up and have shortened my program as much as
possible. I know nothing about the matter, as I'm a complete newbie.
>
> Many thanks, John
>
>
>
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject
> and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
[noparse][[/noparse]Non-text portions of this message have been removed]
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
SX for my robot and have lots of space to spare. The Nuts and Volts article
helped me understand it more too.
Cheers to everyone!
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
[noparse][[/noparse]Non-text portions of this message have been removed]