KS57C2308/P2308/C2316/P2316
ADDRESS SPACES
2-19
ERB FLAG (ERB)
The 1-bit register bank enable flag (ERB) determines the range of addressable working register area. When the
ERB flag is "1", the working register area from register banks 0 to 3 is selected according to the register bank
selection register (SRB). When the ERB flag is "0", register bank 0 is the selected working register area,
regardless of the current value of the register bank selection register (SRB).
When an internal
RESET
is generated, bit 6 of program memory address 0000H is written to the ERB flag. This
automatically initializes the flag. When a vectored interrupt is generated, bit 6 of the respective address table in
program memory is written to the ERB flag, setting the correct flag status before the interrupt service routine is
executed.
During the interrupt routine, the ERB value is automatically pushed to the stack area along with the other PSW
bits. Afterwards, it is popped back to the FB0H.0 bit location. The initial ERB flag settings for each vectored
interrupt are defined using VENTn instructions.
+
+
PROGRAMMING TIP — Using the ERB Flag to Select Register Banks
ERB flag settings for register bank selection:
1.
When ERB = "0":
SRB
1
; Register bank 0 is selected (since ERB = "0", the
; SRB is configured to bank 0)
LD
EA,#34H
; Bank 0 EA
←
#34H
LD
HL,EA
; Bank 0 HL
←
EA
SRB
2
; Register bank 0 is selected
LD
YZ,EA
; Bank 0 YZ
←
EA
SRB
3
; Register bank 0 is selected
LD
WX,EA
; Bank 0 WX
←
EA
2.
When ERB = "1":
SRB
1
; Register bank 1 is selected
LD
EA,#34H
; Bank 1 EA
←
#34H
LD
HL,EA
; Bank 1 HL
←
Bank 1 EA
SRB
2
; Register bank 2 is selected
LD
YZ,EA
; Bank 2 YZ
←
BANK2 EA
SRB
3
; Register bank 3 is selected
LD
WX,EA
; Bank 3 WX
←
Bank 3 EA
Summary of Contents for KS57C2308
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: ......