| ||||||||
Technical Support On-Line Manuals LX51 User's Guide | 32K Common AreaThe following schematic shows hardware that has a 32 KByte common area and seven 32 KByte code banks. A single EPROM is used for all code space. Due to the address decoding logic, code bank 0 is identical to the common area. Therefore, it should not be used by the application.
This design provides 256 KBytes of xdata memory that is mapped like the code memory but is accessed using the /RD and /WR lines (instead of the /PSEN line). The xdata space may be used for variable banking. The following figure illustrates the memory map for this example.
For this hardware the configuration file (L51_BANK.A51) is configured as follows: ?N_BANKS EQU 8 ; Eight banks are required. ?B_MODE EQU 0 ; banking via on-chip I/O Port. ?B_VAR_BANKING EQU 1 ; you may use also variable banking. ?B_PORT EQU 090H ; Port address of P1. ?B_FIRSTBIT EQU 2 ; Bit 2 is the first address line. Note
The BANKAREA directive must be set as follows:
LX51 BANK1 {A.OBJ}, ..., BANK7{G.OBJ} ... BANKAREA (0x8000,0xFFFF)
To use variable banking you must define the additional memory using HDATA and HCONST memory classes as follows:
LX51 BANK1 {A.OBJ}, ..., BANK7{G.OBJ} ... BANKAREA (0x8000,0xFFFF)
CLASSES (XDATA (X:0-X:0x7FFF),
HDATA (X:0x18000-X:0x1FFFF,X:0x28000-X:0x2FFFF,
X:0x38000-X:0x3FFFF,X:0x48000-X:0x4FFFF,
X:0x58000-X:0x5FFFF,X:0x68000-X:0x6FFFF,
X:0x78000-X:0x7FFFF),
HCONST (C:0x18000-C:0x1FFFF,C:0x28000-C:0x2FFFF,
C:0x38000-C:0x3FFFF,C:0x48000-C:0x4FFFF,
C:0x58000-C:0x5FFFF,C:0x68000-C:0x6FFFF,
C:0x78000-C:0x7FFFF))
| |||||||
| ||||||||