We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Jon, I tried that example you gave me, and it didn't seem to work. I think there may be problems with the development kit. David
Hi Jon, Also under the target section i cannot set xdata from 4000-FFFF it complains about it being out of bounds. If i use the BL51 tab i can but there are no options for code banking etc. I don't quite understand what you were trying to do with SETBUFFER in the example. Here is some info on how the creators of the device tend to use it. David ------------------------------------ You would need to set the paging registers manually. Basically, each of the 3 16K segments of the logical address (from 0x4000 to 0xFFFF) can be used to access a corresponding 16K segment of a 128K RAM chip or a 128K ROM chip via the paging method. In most typical applications, what we would suggest is to allocate a fixed section (say page 0) for global variables and the rest to be accessible by paging methods. You would then set one 16K segment, (in our case, we have used C000 to FFFF (Page C)) for xdata and set it to point to page 0 of the RAM chip. Then you might use another 16K segment (say segment B) to access the rest of the RAM chip, using Page 1 to Page 7, since Page 0 is already dedicated to global variables. The last section, segment A can then be used for code banking within the 128K range of the ROM chip. In this case, you would then restrict code banking to the range 0x4000 to 0x7FFF, and tell your compiler to switch banks using this range. In this way, the PAGE_TYPE SFR would be set to: segment C B A 00 01 01 00. where segment C and B is Ram and segment A is Rom. PageC register would be permanently set to 0 for the lowest 16K segment of the RAM chip. PageB would be set in your program to switch between banks 1 to 7. You probably need a memory manager routine to handle this. PageA would be set by your compiler to handle code banking.
Also under the target section i cannot set xdata from 4000-FFFF it complains about it being out of bounds. If i use the BL51 tab i can but there are no options for code banking etc. Note that the second parameter is SIZE and not ENDING address. The size of the XDATA range (from 4000-FFFF) would be 0xC000. Jon