Shop OBEX P1 Docs P2 Docs Learn Events
bs2sx EEPROM question — Parallax Forums

bs2sx EEPROM question

ArchiverArchiver Posts: 46,084
edited 2001-02-26 18:23 in General Discussion
hello,
on the BS2SX there are 8 banks of 2k of memory, can you write to say
the 3rd bank of memory (EEPROM) and read it later?

I know i can do this if i just have a one file program...but i am
doing a multiple file program and say for example in the 4th file i
want to write to eeprom and then later on after the data is collected
be able to read the data. can i do this? please help!

Also if i was using the PAK2 how do i store a number like 9.876 into
eeprom easily (it would be already stored in the paks registers 0-
23) I know of the highbyte...lowbyte stuff but when i do that i get a
different number out than what i put in!!!

thanks
steve

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-02-26 18:23
    >hello,
    >on the BS2SX there are 8 banks of 2k of memory, can you write to say
    >the 3rd bank of memory (EEPROM) and read it later?
    >
    >I know i can do this if i just have a one file program...but i am
    >doing a multiple file program and say for example in the 4th file i
    >want to write to eeprom and then later on after the data is collected
    >be able to read the data. can i do this? please help!
    >
    >Also if i was using the PAK2 how do i store a number like 9.876 into
    >eeprom easily (it would be already stored in the paks registers 0-
    >23) I know of the highbyte...lowbyte stuff but when i do that i get a
    >different number out than what i put in!!!
    >
    >thanks
    >steve

    Hi Steve,
    The only connection between the banks is the RUN command. Each
    bank that you want to use to store data will have to have a short
    program installed. Your main program "calls" (RUNs) the appropriate
    bank. The program there writes or reads the data to/from eeprom,
    using the main RAM or the scratchpad RAM as a temporary holder.
    Then that program RUN's back to the original bank to continue
    execution. Crossbank calls cannot be made from within subroutines
    nor for-next loops.

    There are some examples of one approach to crossbank calls at,
    http://www.emesys.com/BS2SX.htm#Crossbank

    The new BS2P makes this a lot, lot simpler, with the new STORE
    command. You can write/read data directly in all 16k from a program
    running in any of the 8 banks.

    regards,
    -- Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com
Sign In or Register to comment.