Hello Bob,
Introduction:
Concerning Figure 1-5: The figure shows a useful map, which is not the map out of reset. After reset the map is:
0x0000–0x03FF: Register space
0x0800–0x0FFF: 2K RAM
The flash page 0x003E is visible at 0x4000–0x7FFF in the memory map if ROMHM = 0.
In the figure ROMHM = 1 removing page 0x003E from 0x4000–0x7FFF.
Addressing flash space is:
1) Non banked space $4000~$7FFF - alternative addressing PAGE:WINDOW; where:
- PAGE=n*2; n=0x00~0x1F
- window =0x8000~0xBFFF
2) Non banked $C000~$FFFF - alternative addressing PAGE:WINDOW; where:
- PAGE=n*2-1; n=0x01~0x20
- window =0x8000~0xBFFF
Moreover see Table 1-11. Device Specific Flash PAGE Mapping. On the base of this table the only possibility how to address external memory space is to use not used internal memory space, for example after reset:
- INITRG maps 1k of regs to the 1st 2k block into the memory space 0x0000~0x03FF.
- INITRM maps 2k RAM to the 1st 2k block into the memory space 0x0800~0x0FFF.
- If ROMHM = 0: In this configuration addresses: 0x0400~0x07FF; 0x1000~0x3FFF will access external bus.
- If ROMHM = 1: In this configuration addresses: 0x0400~0x07FF; 0x1000~0x7FFF will access external bus.
Page 3E is still accessible by means of alternative address PPAGE:WINDOW (PPAGE=n*2; n=0x00~0x1F, WINDOW=0x8000~0xBFFF)
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------