ADDRESS SPACES
KS57C2308/P2308/C2316/P2316
2-18
EMB FLAG (EMB)
The EMB flag is used to allocate specific address locations in the RAM by modifying the upper 4 bits of 12-bit
data memory addresses. In this way, it controls the addressing mode for data memory banks 0, 1 or 15.
When the EMB flag is "0", the data memory address space is restricted to bank 15 and addresses 000H–07FH of
memory bank 0, regardless of the SMB register contents. When the EMB flag is set to "1", the general-purpose
areas of bank 0, 1 and 15 can be accessed by using the appropriate SMB value.
+
+
PROGRAMMING TIP — Using the EMB Flag to Select Memory Banks
EMB flag settings for memory bank selection:
1.
When EMB = "0":
SMB
1
; Non-essential instruction since EMB = "0"
LD
A,#9H
LD
90H,A
; (F90H)
←
A, bank 15 is selected
LD
34H,A
; (034H)
←
A, bank 0 is selected
SMB
0
; Non-essential instruction since EMB = "0"
LD
90H,A
; (F90H)
←
A, bank 15 is selected
LD
34H,A
; (034H)
←
A, bank 0 is selected
SMB
15
; Non-essential instruction, since EMB = "0"
LD
20H,A
; (020H)
←
A, bank 0 is selected
LD
90H,A
; (F90H)
←
A, bank 15 is selected
2.
When EMB = "1":
SMB
1
; Select memory bank 1
LD
A,#9H
LD
90H,A
; (190H)
←
A, bank 1 is selected
LD
34H,A
; (134H)
←
A, bank 1 is selected
SMB
0
; Select memory bank 0
LD
90H,A
; (090H)
←
A, bank 0 is selected
LD
34H,A
; (034H)
←
A, bank 0 is selected
SMB
15
; Select memory bank 15
LD
20H,A
; Program error, but assembler does not detect it
LD
90H,A
; (F90H)
←
A, bank 15 is selected
Summary of Contents for C2316
Page 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Page 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Page 170: ......
Page 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Page 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Page 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Page 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Page 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Page 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Page 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Page 318: ......
Page 320: ......
Page 322: ......
Page 325: ......
Page 327: ......