This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Code Banking

Hello,

Is there any way to make different bank use different address space(starting address and ending address is not same to each other)? Thank you!

  • No. The major concept behind code banking is that your hardware provides a switchable memory window that you can point to different spaces. Having the banks start at different addresses would eliminate any benefit of code banking.

    It _is_ possible to place all of your code banks in one >64Kb device by using a port as additional high bits in the code address. That is, the 16 ROM address lines from the 8051 are linked to the lower 16 address lines of the ROM, and a port (P1-P7) is mapped to address lines 16,17,18, etc for however many banks that you need. Look in the application notes for an example of how to do this, if this is, in fact, what you're trying to do.

  • if we impletement our system with 8031+PSD913, the PSD913 is from WSI, it contains 128K Main Flash, so that the programmer MUST apply the code bank switch tech, the KEIL C provide the bank port support, such as P1, xdata RAM, but KEIL C will take all P1 or xdata RAM, for example, PSD913 page address is CSIOP+0xE0, if the system flash have 8 pages, we only need 3 bit page register, the others 5 bit page register can be used for other application. but we change the BANK-Switch.A51 code, every switch, we only change the 3 bit page register, others will not be effected.