SX28 memory back switching (2K to 2K to 2K ect..) for subroutines
T&E Engineer
Posts: 1,396
There is a good working example of how to switch between memory banks in the BS2p downloadable book on how to use subroutines in various memory banks.
How is this done on the SX-28 using SX/B?
I am thinking of porting my current project (BS2px) over to a SX-28 that has 2 programs in bank0 and bank1 (for the subroutine data).
If it involves alot of assembly language then I may not do it.
Basically what I am asking is how to I access more than 2 K of EEPROM space on the SX-28 preferably for a subroutine basis?
Thanks,
Timothy Gilmore
How is this done on the SX-28 using SX/B?
I am thinking of porting my current project (BS2px) over to a SX-28 that has 2 programs in bank0 and bank1 (for the subroutine data).
If it involves alot of assembly language then I may not do it.
Basically what I am asking is how to I access more than 2 K of EEPROM space on the SX-28 preferably for a subroutine basis?
Thanks,
Timothy Gilmore
Comments
In the latest version of SX/B, you no longer have to do bank switching in order to access all of the memory. You predifine your subroutines up front, and then code them, place them within your main like a command.
Now, if you specifically want to use the bank technique, I believe you can still do that.
Ray
It can't be that easy. Is this true?
I just want to be able to use a program that has a Lookdown table (as a subroutine if needed) that would otherwise be too big for the initial 2K of EEPROM space. I had to originally change from a BS2 to a BS2px (and was able to get it to work pretty much painlessly).
Thanks,
Timothy Gilmore
I believe the SX/B 1.42 compiler gives you access to all of the banks without having to go through the misery of linking the banks within your program manually. Before , if you put a subroutine in, lets say bank 2, then you would have to call your subroutine with an @ in front of it.
I remember the first program I did in the older version of SX/B, I was just typing in code and subroutines, the compiler did not tell you when you just left bank 0, and went to bank 1. Look in the latest help file for SX/B, it gives an explanation, better then me trying to paraphrase.
Ray
Questions about the BASIC Stamp don't belong in this forum.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
My question was related to how to do something on the SX28.
Timothy Gilmore
Post Edited (tdg8934) : 1/6/2006 1:19:43 AM GMT
If you are asking if there is a way to have more than 2K of code on the sx28 ? If so then no there is no way to have more than 2K of code space.
If your code doesn't fit you either have to optimize it, or switch to the SX48 (which has 4K of code space).
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"I hope the goonwave is not vaporware"
·
I was thinking for some reason that the SX-28 had (8) 2K banks of memory. No problem.
Thanks Bean!