Is is possible with the 8051 architecture to copy a program or function into XRAM and execute it? Or do the separate code/data address spaces prevent this? What I'm trying to do is to write a boot loader that can put the loader routine into flash, so that the flash chip the boot loader resides in can be erased and re-written. The plan is NOT to update the boot loader portion of the flash, but the application portion. The flash chip we're using doesn't allow you to execute out of the flash if any portion of the flash is being programmed. We're using the Philips 87C51MB2 chip, which is an MX part. Thanks, Ed
With the addressing capability of the MX it should be simple: OR RD and PSEN to both the ROM and RAM reads, make !WR go to both. Then decode the msb of the address and allocate different address spaces to ROM and RAM. Then which memory is active becomes a simple matter of the address. Been there done that. Erik