How to use the memory banks -1 – Acrosser AR-B1047 User Manual
Page 28
AR-B1047 User’s Guide
4-1
4. HOW TO USE THE MEMORY BANKS
This section provides the information about how to access the memory on the AR-B1047 without using the AR-
B1047 SSD BIOS. The AR-B1047 hardware cut every 8K bytes of memory into a memory bank. To access the
data in memory, you have to assign the chip number and the bank number. On every chip, the memory bank
number starts from the number zero. The last memory bank number depends on the size of the memory chip used
on the AR-B1047. For example, if you use the 256K bytes memory chip, the bank number on every chip would be
in the range of 0 to 31. The chip number and the bank number are determined by the bank selected register and
the chip selected register on the AR-B1047.
The I/O address of these registers is determined by SW1-1 of SW1. The memory address of the memory bank is
located on the range selected by SW1-2 and SW1-7 of the SW1. Please refer to the how to select the I/O port
address and the memory address of the memory bank.
The I/O port address of the bank select register is base port+0 and the I/O port address of the chip select register
is base port + 2. The following is the format of the bank select register and chip select register.
Register I/O
Port D7 D6 D5 D4 D3 D2 D1 D0
Bank Select
Register
Base+0
WPE
A6 A5 A4 A3 A2 A1 A0
Chip Select
Register
Base+2 0 0 0 0 0
CS2
CS1
CS0
Table 4-1 The Format of the Memory Bank
Where:
WPE
Write protect enable bit (refer to section “Using the Write
Protect Function” for details)
A6 –
–
–
– A0
Bank select bits, A0 is the LSB.
CS2 –
–
–
– CS0 Chip select bits of MEM1 to MEM8, CS0 is the LSB.
For different types of memory, A0 to A6 have different explanations. These bits are used to select the bank
number of specific memory located by CS0 to CS2.
Memory
A6 A5 A4 A3 A2 A1 A0
64KB
EPROM/FLASH 0 0 1 0
BS2
BS1
BS0
128KB
EPROM/FLASH
0 0 1
BS3
BS2
BS1
BS0
256KB
EPROM/FLASH 0 BS4 1 BS3
BS2
BS1
BS0
512KB
EPROM/FLASH 0 BS4 BS5 BS3 BS2 BS1 BS0
1MB
EPROM
BS6 BS4 BS5 BS3 BS2 BS1 BS0
128KB
SRAM
0 1 0
BS3
BS2
BS1
BS0
512KB
SRAM
0 BS5 BS4 BS3 BS2 BS1 BS0
Table 4-2 The Different Type Memory Explanation
NOTE: BS0 to BS6 are the memory bank select bits. For example, 128KB memory has sixteen 8K-byte banks, so 4bits
(BS0 to BS3) are needed.
Example :
Select the 10
th
bank of the MEM4 on the AR-B1047. The AR-B1047 is using 27C020 (256K X 8), and the
base port is &H224.
100 base_port=&H224
110 OUT
base_port+0,&H19
120 OUT
base_port+2,&H03