Shop OBEX P1 Docs P2 Docs Learn Events
BS2, BS2SX, and EEPROM question — Parallax Forums

BS2, BS2SX, and EEPROM question

ArchiverArchiver Posts: 46,084
edited 2001-09-17 18:18 in General Discussion
Hi All,
I'm working on a program using a BS2 and I've run out of EEPROM.
Now, I may be able to reduce the size of the program somewhat by
making it more efficient, but I don't think it will be enough. As I
see it, I may have two options, either add more external EEPROM for
the BS2, or use a BS2SX.
If I understand things correctly, the BS2SX can hold 8 programs
with 2048 bytes of EEPROM for each program.
I can break my program up into 6 sub programs quite easily, as
long as they can be integrated together and use common variables.
I'm quite new at this, and just getting to the point to where I
can write code for the BS2, but the added features of the SX make it
a bit intimidating for me. Can anyone advise me on this?

Thanks,
Robert

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-09-16 00:29
    Robert,

    The BS2SX sounds as if it will do the job for you. I think Parallax
    has an equiv of the BS2SX which runs at the same speed as the BS2
    which will alleviate the need to change various timing parameters.

    At http://www.phanderson.com/stamp/ I did a discussion of the BS2SX a
    number of years ago. Hopefully, it will be of some help to you.

    Peter H Anderson, http://www.phanderson.com

    > Thanks,
    > Robert
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-16 01:13
    Hi Peter,
    Your discussion is a big help. I have a BS2SX that I bought
    originally, but shelved in favor of the BS2 in the interests of the
    slightly easier learning curve. I'll dust it off and play around with
    it, to get a feel for how to utilize the extra EEPROM and scratchpad
    RAM.

    Thanks a bunch,
    Robert

    --- In basicstamps@y..., pha@p... wrote:
    > Robert,
    >
    > The BS2SX sounds as if it will do the job for you. I think
    Parallax
    > has an equiv of the BS2SX which runs at the same speed as the BS2
    > which will alleviate the need to change various timing parameters.
    >
    > At http://www.phanderson.com/stamp/ I did a discussion of the BS2SX
    a
    > number of years ago. Hopefully, it will be of some help to you.
    >
    > Peter H Anderson, http://www.phanderson.com
    >
    > > Thanks,
    > > Robert
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-16 09:15
    Hi Robert,

    I'm currently using a BS2SX to control my central heating system.
    It's quite a big project, with a parallel LCD, 6-key keyboard, 3 DS1620
    thermometer chip, 4 LEDs, a buzzer, and 6 relays. All together would require
    31 I/O lines, and I do it with the 16 of the BS2-SX plus some hardware.
    I have a lot of messages to display, which are located on differents program
    banks of the BS2-SX.
    Of course, you can't read the EEPROM of one bank from another bank. But you
    can run different programs to use different bank's EEPROM.
    I use the "crossbank calls" and "global and local variables" techniques.
    Those techniques are described in an application note from EME Systems.
    Whit this, it's quite easy to "navigate" from one bank to the other.
    Let me know if you want to have more info.
    And don't get intimidated by the BS2-SX, it's just like a BIG (and fast !)
    BS2... :-)

    Phil.

    Original Message
    From: <robert_hiebert@s...>
    Subject: [noparse][[/noparse]basicstamps] BS2, BS2SX, and EEPROM question


    > Hi All,
    > I'm working on a program using a BS2 and I've run out of EEPROM.
    > Now, I may be able to reduce the size of the program somewhat by
    > making it more efficient, but I don't think it will be enough. As I
    > see it, I may have two options, either add more external EEPROM for
    > the BS2, or use a BS2SX.
    > If I understand things correctly, the BS2SX can hold 8 programs
    > with 2048 bytes of EEPROM for each program.
    > I can break my program up into 6 sub programs quite easily, as
    > long as they can be integrated together and use common variables.
    > I'm quite new at this, and just getting to the point to where I
    > can write code for the BS2, but the added features of the SX make it
    > a bit intimidating for me. Can anyone advise me on this?
    >
    > Thanks,
    > Robert
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-16 16:00
    Hi Phil,
    Thanks for your words of encouragement. From the sounds of the
    complexity of your project, mine shouldn't present any problem for
    the SX.
    Right now, I'm still developing the sub programs, and have a
    nasty bug in one of them. When I call a particular subroutine at a
    particular point in the program, it resets the Stamp. This routine is
    called up at other points and works fine.
    I'll keep slugging.

    Regards,
    Robert
    --- In basicstamps@y..., "Philippe Derenne" <derennep@s...> wrote:
    > Hi Robert,
    >
    > I'm currently using a BS2SX to control my central heating system.
    > It's quite a big project, with a parallel LCD, 6-key keyboard, 3
    DS1620
    > thermometer chip, 4 LEDs, a buzzer, and 6 relays. All together
    would require
    > 31 I/O lines, and I do it with the 16 of the BS2-SX plus some
    hardware.
    > I have a lot of messages to display, which are located on
    differents program
    > banks of the BS2-SX.
    > Of course, you can't read the EEPROM of one bank from another bank.
    But you
    > can run different programs to use different bank's EEPROM.
    > I use the "crossbank calls" and "global and local variables"
    techniques.
    > Those techniques are described in an application note from EME
    Systems.
    > Whit this, it's quite easy to "navigate" from one bank to the other.
    > Let me know if you want to have more info.
    > And don't get intimidated by the BS2-SX, it's just like a BIG (and
    fast !)
    > BS2... :-)
    >
    > Phil.
    >
    >
    Original Message
    > From: <robert_hiebert@s...>
    > Subject: [noparse][[/noparse]basicstamps] BS2, BS2SX, and EEPROM question
    >
    >
    > > Hi All,
    > > I'm working on a program using a BS2 and I've run out of
    EEPROM.
    > > Now, I may be able to reduce the size of the program somewhat by
    > > making it more efficient, but I don't think it will be enough. As
    I
    > > see it, I may have two options, either add more external EEPROM
    for
    > > the BS2, or use a BS2SX.
    > > If I understand things correctly, the BS2SX can hold 8
    programs
    > > with 2048 bytes of EEPROM for each program.
    > > I can break my program up into 6 sub programs quite easily,
    as
    > > long as they can be integrated together and use common variables.
    > > I'm quite new at this, and just getting to the point to
    where I
    > > can write code for the BS2, but the added features of the SX make
    it
    > > a bit intimidating for me. Can anyone advise me on this?
    > >
    > > Thanks,
    > > Robert
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-16 17:16
    Hi Robert,

    Check your gosub nesting level at the particular point.
    It should not exceed 4 which is the maximum number of nested
    gosubs allowed. Make a goto loop if it does, instead of a gosub.

    greetings peter


    Oorspronkelijk bericht
    Van: robert_hiebert@s... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=MqYlYIDm0Vmni-MSLpwGT26uyq8MsQ-XteMY-AsFCTDtefJvhqbcpJhav9MXYJJ0Vnbg2BStdDZdwJd34YTVAVRt]robert_hiebert@s...[/url
    Verzonden: zondag 16 september 2001 16:00
    Aan: basicstamps@yahoogroups.com
    Onderwerp: [noparse][[/noparse]basicstamps] Re: BS2, BS2SX, and EEPROM question


    Hi Phil,
    Thanks for your words of encouragement. From the sounds of the
    complexity of your project, mine shouldn't present any problem for
    the SX.
    Right now, I'm still developing the sub programs, and have a
    nasty bug in one of them. When I call a particular subroutine at a
    particular point in the program, it resets the Stamp. This routine is
    called up at other points and works fine.
    I'll keep slugging.

    Regards,
    Robert
    --- In basicstamps@y..., "Philippe Derenne" <derennep@s...> wrote:
    > Hi Robert,
    >
    > I'm currently using a BS2SX to control my central heating system.
    > It's quite a big project, with a parallel LCD, 6-key keyboard, 3
    DS1620
    > thermometer chip, 4 LEDs, a buzzer, and 6 relays. All together
    would require
    > 31 I/O lines, and I do it with the 16 of the BS2-SX plus some
    hardware.
    > I have a lot of messages to display, which are located on
    differents program
    > banks of the BS2-SX.
    > Of course, you can't read the EEPROM of one bank from another bank.
    But you
    > can run different programs to use different bank's EEPROM.
    > I use the "crossbank calls" and "global and local variables"
    techniques.
    > Those techniques are described in an application note from EME
    Systems.
    > Whit this, it's quite easy to "navigate" from one bank to the other.
    > Let me know if you want to have more info.
    > And don't get intimidated by the BS2-SX, it's just like a BIG (and
    fast !)
    > BS2... :-)
    >
    > Phil.
    >
    >
    Original Message
    > From: <robert_hiebert@s...>
    > Subject: [noparse][[/noparse]basicstamps] BS2, BS2SX, and EEPROM question
    >
    >
    > > Hi All,
    > > I'm working on a program using a BS2 and I've run out of
    EEPROM.
    > > Now, I may be able to reduce the size of the program somewhat by
    > > making it more efficient, but I don't think it will be enough. As
    I
    > > see it, I may have two options, either add more external EEPROM
    for
    > > the BS2, or use a BS2SX.
    > > If I understand things correctly, the BS2SX can hold 8
    programs
    > > with 2048 bytes of EEPROM for each program.
    > > I can break my program up into 6 sub programs quite easily,
    as
    > > long as they can be integrated together and use common variables.
    > > I'm quite new at this, and just getting to the point to
    where I
    > > can write code for the BS2, but the added features of the SX make
    it
    > > a bit intimidating for me. Can anyone advise me on this?
    > >
    > > Thanks,
    > > Robert


    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/
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-16 22:59
    >...
    >I'm quite new at this, and just getting to the point to where I
    >can write code for the BS2, but the added features of the SX make it
    >a bit intimidating for me. Can anyone advise me on this?
    >
    >Thanks,
    >Robert

    Hi Robert,

    I have some information on cross bank programming posted at
    http://www.emesystems.com/BS2SX.htm
    You might also want to check out a thread from earlier this summer
    where Peter Verkaik advanced the idea of creating a crossbank stack.
    I think the final result of that is to be found in the FAQ at
    http://www.al-williams.com/wd5gnr/stampfaq.htm

    -- regards,
    Tracy Allen
    electronically monitored ecosystems
    mailto:tracy@e...
    http://www.emesystems.com
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-16 23:48
    Peter, you are brilliant !!
    I'm using a PAK IX in that particular subroutine, and it has 3
    subs of it's own. I saw that 4 nest maximum in the manual, but had no
    idea what the consequences might be. May be a bit of a challenge to
    keep the program size down and still maximize on subroutines.
    Just to add to the overall frustration level, when I went to try
    your suggestion, at first, none of my programs would respond
    properly. I tried all sorts of different programs with no luck, just
    when I was about to give up and pour myself a stiff one, I happened
    to pass my hand over the bread board, and lo and behold, things came
    to life!
    Well, so happpens my breadboard, which houses my Stamp and 3
    PAKs, as well as some circuits that make up a simulator for my
    project, are placed between my PC keyboard and monitor.
    Could it be that static electricity is another unrelated
    problem, and if so, what's the permenant fix? I'll have to be very
    carefull about static and noise related problems, as this is an
    automotive application.
    I moved the board around a bit, but it's back in it's original
    location, working fine, as I rewrite my program to fix the nesting
    problem.

    Again, Many thanks.
    Regards,
    Robert

    --- In basicstamps@y..., "Peter Verkaik" <peterverkaik@b...> wrote:
    > Hi Robert,
    >
    > Check your gosub nesting level at the particular point.
    > It should not exceed 4 which is the maximum number of nested
    > gosubs allowed. Make a goto loop if it does, instead of a gosub.
    >
    > greetings peter
    >
    >
    >
    Oorspronkelijk bericht
    > Van: robert_hiebert@s... [noparse][[/noparse]mailto:robert_hiebert@s...]
    > Verzonden: zondag 16 september 2001 16:00
    > Aan: basicstamps@y...
    > Onderwerp: [noparse][[/noparse]basicstamps] Re: BS2, BS2SX, and EEPROM question
    >
    >
    > Hi Phil,
    > Thanks for your words of encouragement. From the sounds of the
    > complexity of your project, mine shouldn't present any problem for
    > the SX.
    > Right now, I'm still developing the sub programs, and have a
    > nasty bug in one of them. When I call a particular subroutine at a
    > particular point in the program, it resets the Stamp. This routine
    is
    > called up at other points and works fine.
    > I'll keep slugging.
    >
    > Regards,
    > Robert
    > --- In basicstamps@y..., "Philippe Derenne" <derennep@s...> wrote:
    > > Hi Robert,
    > >
    > > I'm currently using a BS2SX to control my central heating system.
    > > It's quite a big project, with a parallel LCD, 6-key keyboard, 3
    > DS1620
    > > thermometer chip, 4 LEDs, a buzzer, and 6 relays. All together
    > would require
    > > 31 I/O lines, and I do it with the 16 of the BS2-SX plus some
    > hardware.
    > > I have a lot of messages to display, which are located on
    > differents program
    > > banks of the BS2-SX.
    > > Of course, you can't read the EEPROM of one bank from another
    bank.
    > But you
    > > can run different programs to use different bank's EEPROM.
    > > I use the "crossbank calls" and "global and local variables"
    > techniques.
    > > Those techniques are described in an application note from EME
    > Systems.
    > > Whit this, it's quite easy to "navigate" from one bank to the
    other.
    > > Let me know if you want to have more info.
    > > And don't get intimidated by the BS2-SX, it's just like a BIG (and
    > fast !)
    > > BS2... :-)
    > >
    > > Phil.
    > >
    > >
    Original Message
    > > From: <robert_hiebert@s...>
    > > Subject: [noparse][[/noparse]basicstamps] BS2, BS2SX, and EEPROM question
    > >
    > >
    > > > Hi All,
    > > > I'm working on a program using a BS2 and I've run out of
    > EEPROM.
    > > > Now, I may be able to reduce the size of the program somewhat by
    > > > making it more efficient, but I don't think it will be enough.
    As
    > I
    > > > see it, I may have two options, either add more external EEPROM
    > for
    > > > the BS2, or use a BS2SX.
    > > > If I understand things correctly, the BS2SX can hold 8
    > programs
    > > > with 2048 bytes of EEPROM for each program.
    > > > I can break my program up into 6 sub programs quite easily,
    > as
    > > > long as they can be integrated together and use common
    variables.
    > > > I'm quite new at this, and just getting to the point to
    > where I
    > > > can write code for the BS2, but the added features of the SX
    make
    > it
    > > > a bit intimidating for me. Can anyone advise me on this?
    > > >
    > > > Thanks,
    > > > Robert
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@y...
    > 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/
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-17 09:17
    Hi Robert,

    A general gosub nesting level workaround is described by Peter Anderson at
    http://www.phanderson.com/stamp/gosub.html
    Might be helpful if you don't want to rewrite your subroutines, apart from
    the
    return statement.

    regards peter


    Oorspronkelijk bericht
    Van: robert_hiebert@s... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=JEeCxtwwzQqIw-0X52Ogz39ZurtgHtVllot86RT6CWUX-o8KTcXIcrcdW1PHUtOkN8DN80RBkQj6qHiOIsAks3tYOw]robert_hiebert@s...[/url
    Verzonden: zondag 16 september 2001 23:49
    Aan: basicstamps@yahoogroups.com
    Onderwerp: [noparse][[/noparse]basicstamps] Re: BS2, BS2SX, and EEPROM question


    Peter, you are brilliant !!
    I'm using a PAK IX in that particular subroutine, and it has 3
    subs of it's own. I saw that 4 nest maximum in the manual, but had no
    idea what the consequences might be. May be a bit of a challenge to
    keep the program size down and still maximize on subroutines.
    Just to add to the overall frustration level, when I went to try
    your suggestion, at first, none of my programs would respond
    properly. I tried all sorts of different programs with no luck, just
    when I was about to give up and pour myself a stiff one, I happened
    to pass my hand over the bread board, and lo and behold, things came
    to life!
    Well, so happpens my breadboard, which houses my Stamp and 3
    PAKs, as well as some circuits that make up a simulator for my
    project, are placed between my PC keyboard and monitor.
    Could it be that static electricity is another unrelated
    problem, and if so, what's the permenant fix? I'll have to be very
    carefull about static and noise related problems, as this is an
    automotive application.
    I moved the board around a bit, but it's back in it's original
    location, working fine, as I rewrite my program to fix the nesting
    problem.

    Again, Many thanks.
    Regards,
    Robert
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-17 09:29
    Hi Robert,

    > Well, so happpens my breadboard, which houses my Stamp and 3
    >PAKs, as well as some circuits that make up a simulator for my
    >project, are placed between my PC keyboard and monitor.
    > Could it be that static electricity is another unrelated
    >problem, and if so, what's the permenant fix? I'll have to be very
    >carefull about static and noise related problems, as this is an
    >automotive application.
    > I moved the board around a bit, but it's back in it's original
    >location, working fine, as I rewrite my program to fix the nesting
    >problem.

    Radiation from a monitor might cause problems, however as your
    project 'came to life' as you passed your hand over the breadboard,
    it most likely is a loose connection, problably some ground connection.
    I know breadboard connections give way if heavily used.
    To shield your project from any radiation you can place the breadboard
    inside a metal case, that should help.

    regards peter
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-17 15:48
    Thanks Tracy,
    Excellent stuff! I printed them both and they're in my reference
    library.

    regards,
    Robert

    --- In basicstamps@y..., Tracy Allen <tracy@e...> wrote:
    > >...
    > >I'm quite new at this, and just getting to the point to where I
    > >can write code for the BS2, but the added features of the SX make
    it
    > >a bit intimidating for me. Can anyone advise me on this?
    > >
    > >Thanks,
    > >Robert
    >
    > Hi Robert,
    >
    > I have some information on cross bank programming posted at
    > http://www.emesystems.com/BS2SX.htm
    > You might also want to check out a thread from earlier this summer
    > where Peter Verkaik advanced the idea of creating a crossbank
    stack.
    > I think the final result of that is to be found in the FAQ at
    > http://www.al-williams.com/wd5gnr/stampfaq.htm
    >
    > -- regards,
    > Tracy Allen
    > electronically monitored ecosystems
    > mailto:tracy@e...
    > http://www.emesystems.com
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-17 15:52
    Hi Peter,
    More great information! I printed that out too, and added it to
    my reference material.
    Thanks for the advice on radiation as well.

    Regards,
    Robert

    --- In basicstamps@y..., "Peter Verkaik" <peterverkaik@b...> wrote:
    > Hi Robert,
    >
    > A general gosub nesting level workaround is described by Peter
    Anderson at
    > http://www.phanderson.com/stamp/gosub.html
    > Might be helpful if you don't want to rewrite your subroutines,
    apart from
    > the
    > return statement.
    >
    > regards peter
    >
    >
    >
    Oorspronkelijk bericht
    > Van: robert_hiebert@s... [noparse][[/noparse]mailto:robert_hiebert@s...]
    > Verzonden: zondag 16 september 2001 23:49
    > Aan: basicstamps@y...
    > Onderwerp: [noparse][[/noparse]basicstamps] Re: BS2, BS2SX, and EEPROM question
    >
    >
    > Peter, you are brilliant !!
    > I'm using a PAK IX in that particular subroutine, and it has 3
    > subs of it's own. I saw that 4 nest maximum in the manual, but had
    no
    > idea what the consequences might be. May be a bit of a challenge to
    > keep the program size down and still maximize on subroutines.
    > Just to add to the overall frustration level, when I went to
    try
    > your suggestion, at first, none of my programs would respond
    > properly. I tried all sorts of different programs with no luck, just
    > when I was about to give up and pour myself a stiff one, I happened
    > to pass my hand over the bread board, and lo and behold, things came
    > to life!
    > Well, so happpens my breadboard, which houses my Stamp and 3
    > PAKs, as well as some circuits that make up a simulator for my
    > project, are placed between my PC keyboard and monitor.
    > Could it be that static electricity is another unrelated
    > problem, and if so, what's the permenant fix? I'll have to be very
    > carefull about static and noise related problems, as this is an
    > automotive application.
    > I moved the board around a bit, but it's back in it's original
    > location, working fine, as I rewrite my program to fix the nesting
    > problem.
    >
    > Again, Many thanks.
    > Regards,
    > Robert
  • ArchiverArchiver Posts: 46,084
    edited 2001-09-17 18:18
    From: "Peter Verkaik" <peterverkaik@b...>
    To: <basicstamps@yahoogroups.com>
    Sent: Monday, September 17, 2001 10:29 AM
    Subject: RE: [noparse][[/noparse]basicstamps] Re: BS2, BS2SX, and EEPROM question


    > Radiation from a monitor might cause problems, however as your
    > project 'came to life' as you passed your hand over the breadboard,
    > it most likely is a loose connection, problably some ground connection.
    > I know breadboard connections give way if heavily used.

    I had the same problem because I used too thin wires...

    Phil.
Sign In or Register to comment.