UPD75518 NEC, UPD75518 Datasheet - Page 19

no-image

UPD75518

Manufacturer Part Number
UPD75518
Description
4 BIT SINGLE-CHIP MICROCOMPUTER
Manufacturer
NEC
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
UPD75518GF-152
Manufacturer:
NEC
Quantity:
40
Part Number:
UPD75518GF-169
Manufacturer:
ST
Quantity:
103
Part Number:
UPD75518GF-245-3B9
Manufacturer:
NEC
Quantity:
275
Part Number:
UPD75518GF-245-3B9
Manufacturer:
NEC
Quantity:
1 000
Part Number:
UPD75518GF-347
Manufacturer:
CORERIVER
Quantity:
930
Part Number:
UPD75518QF
Manufacturer:
ROHM
Quantity:
11 970
2.2 GENERAL REGISTER BANK CONFIGURATION
H, and L. These registers are mapped to addresses 00H to 1FH in memory bank 0 of the data memory. (See
Fig. 2-3.) To specify a general register bank, a register bank enable flag (RBE) and a register bank select register
(RBS) are contained. The RBS is a register used to select a register bank, and the RBE is a flag used to determine
whether a register bank selected using the RBS is to be enabled. The register bank (RB) enabled at instruction
execution is determined as RB = RBE•RBS
by selecting a register bank from the four register banks, depending on whether the processing is normal
processing or interrupt processing. (The RBE is automatically saved and set at the time of interrupt processing,
and is automatically restored upon completion of interrupt processing.)
decrements not only on a 4-bit basis, but also on an 8-bit basis with the XA, HL, DE, and BC register pairs.
In this case, the register pairs of the register bank that has the inverted value of bit 0 of a register bank specified
by RBE•RBS can be specified as XA’, HL’, DE’, and BC’, thus providing eight 8-bit registers. (See Fig. 2-4.)
Normal processing
Single interrupt processing
Dual interrupt processing
Multiple (triple or more) interrupt processing
The PD75518(A) contains four register banks, each consisting of eight general registers: X, A, B, C, D, E,
As indicated in Table 2-2, the PD75518(A) enables the user to create programs in a very efficient manner
The RBE and RBS are set as indicated below.
Example
The general registers allow transfers, comparisons, arithmetic/logical operations, and increments and
Example
Table 2-2 Example of the Use of Register Banks with Normal Routines and Interrupt Routines
SET1 RBE ; RBE
CLR1 RBE ; RBE
SEL
SEL
SET1
SEL
MOV
ADDS HL, XA
SUBS HL’, XA
INCS
MOV
MOV
RB0 ; RBS
RB3 ; RBS
RBE
RB2
XA, #18H ; XA
HL
XA, #00H ; XA
XA, #10H ; XA
; RBE
; RBS
; HL
; HL’
; HL
1
0
0
3
HL+XA
HL+1
18H
00H (string effect)
10H (string effect)
HL’–XA (HL’ is HL of register bank 3)
1
2
Use register banks 2 and 3 with RBE = 1.
Use register bank 0 with RBE = 0.
Use register bank 1 with RBE = 1.
(In this case, the RBS needs to be saved and restored.)
Save the registers with PUSH or POP.
PD75518(A)
19

Related parts for UPD75518