Hi all, I am new to 8051 architecture. The code memory device of my 8051 system is implemented as 64k RAM instead of ROM/EEPROM. Does it make sense to load the 8051 code dynamically from the NAND flash to the RAM device resided on the code memory space? The only way i think is the code banking. The common area code was put on the first 32k memory space, and the remained 32k memory holds the bank(n) code which originally stored on the NAND flash. In other word, 0x0000~0x7FFF for common area and 0x80000~0xFFFF for bank switching. For example, before calling the function which on the bank 2, the system loads the bank 2's code from NAND flash to the 0x8000 of the code memory. Does it make sense to implement such mechanism in the 8051 system? Thanks, KJ
Bank Switching will be quite slow this way. So you really should investigate how code banking works. Run the example code: C:\Keil\C51\Examples\CodeBanking\Bank_EX1 in the simulator and review the executed instructions when a code banking call occurs. See also: http://www.keil.com/support/docs/1059.htm Reinhard