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.
What is VARIABLE BANKING ? For what situtations I shouldn't use Bank0 ?
Hi Neil, I found the term "variable banking" referenced in a example stated at http://www.keil.com/support/man/docs/bl51/bl51_bk_example4.htm
So, please can someone tell me more about it.
And also i would like to know the situations where I shouldn't be making use of Bank 0.
"Banking" in this context means accessing more physical memory than the usual 8051 address space (64KB code + 64KB data). This is done by dividing physical memory into "banks" (usually 32KB) and adding extra address decoding hardware to provide the extra address lines to the physical memory.
The Keil tools support common ways of doing this for both the code address space ("code banking") and xdata address space ("variable banking").
Data banking is perhaps most commonly done as a series of 64KB segments. There should be no particular issue about using bank 0 in this case.
Code banking is commonly done as a 32KB "common" bank, with a series of 32KB switchable banks in the upper half of the address space. Given that memory always comes in powers-of-two sizes, one of the switchable banks will usually decode to the same physical memory locations as the common bank. Usually this will be bank 0. Since this physical memory is the common bank, you generally don't want to use bank 0 for any other purpose.
thank you, Drew