Eeprom
K_onghena
Posts: 2
Hello there,
I've recently bought a BS2P24 because the EEPROM size of my BS2 was to small for the program i had written. Unfortunately i get the same problem the BS2 editor tells me the EEPROM is full. But normally the BS2P24 has 8x2K EEPROM. How do i store my program or parts of it in the EEPROM i can't reach.
Thanks in advance!
I've recently bought a BS2P24 because the EEPROM size of my BS2 was to small for the program i had written. Unfortunately i get the same problem the BS2 editor tells me the EEPROM is full. But normally the BS2P24 has 8x2K EEPROM. How do i store my program or parts of it in the EEPROM i can't reach.
Thanks in advance!
Comments
http://forums.parallax.com/showthread.php?t=122032
Once you get used to it the run command isn't hard to use, but it is not as easy as a flat memory model.
Also remember that memory for data as accessed with the READ and WRITE commands is addressed in a different fashion in multi-slot BS2s. You must use the STORE command to specify which memory slot you are addressing the EEPROM. You can do this independent of which slot you are running your code in with the RUN command. There are a few examples of code out there that can "flatten" out the memory so it looks like it is all one contiguous piece of EEPROM. I did it by maintaining one NIB slot variable and two WORD variables.. one for the real memory location within the slot and one "virtual" memory location that was seen by the program as one contiguous block of memory. Basically a subroutine is called that converts a virtual memory location into a slot and real memory location within before every accessing of the EEPROM.
Hope this helps some.
Rick
Does anyone know if the program will run much slower when it's split up?
Grtz
Some of the BS2 variants allow cross bank loading and storing to the EPROM which lets you save space in the main bank for code.
http://www.parallax.com/tabid/440/Default.aspx
Speed of the BS2p is faster than the 'pe by a factor of 2.5.
As has already been said, write the program in modules. I usually have a initialization and a user menu in slot 0, and it can branch to one or more other slots for user parameter setting and for services that are called on from a main menu. Then slot 1 is a main loop. It does do a dance to branch and return into other slots to handle certain devices like sensors and mass storage that have their own driver modules. The STORE command is useful for keeping data and parameters in other slots.
http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/col/nv87.pdf
http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/code/nv87.zip