ST63140,142,126,156
MEMORY SPACES (Continued)
Data ROM Addressing. All the read-only data are
physically implemented in the ROM in which the
Program Space is also implemented. The ROM
therefore contains the program to be executed and
also the constants and the look-up tables needed
for the program. The locations of Data Space in
which the different constants and look-up tables
are addressed by the ST631xx Core can be con-
sidered as being a 64-byte window through which
it is possible to access to the read-only data stored
in the ROM. This window is located from address
40H to address 7Fh in the Data space and allows
the direct reading of the bytes from the address
000h to address 03Fh in the ROM. All the bytes of
the ROM can be used to store either instructions or
read-only data. Indeed, the window can be moved
by step of 64 bytes along the ROM in writing the
appropriate code in the Write-only Data ROM Win-
dow register (DRWR, location C9h). The effective
address of the byte to be read as a data in the ROM
is obtained by the concatenation of the 6 less sig-
nificant bits of the address in the Data Space (as
less significant bits) and the content of the DRWR
(as most significant bits). So when addressing lo-
cation 40h of data space, and 0 is loaded in the
DRWR, the physical addressed location in ROM is
00h.
Figure 14. Data ROM Window Register
DWR
Data ROM Window Register
(C9h, Write Only)
D7 D6 D5 D4 D3 D2 D1 D0
DWR0 = Data ROM Window 0
DWR1 = Data ROM Window 1
DWR2 = Data ROM Window 2
DWR3 = Data ROM Window 3
DWR4 = Data ROM Window 4
DWR5 = Data ROM Window 5
DWR6 = Data ROM Window 6
UNUSED
D7. This bit is not used.
DWR6-DWR0. These are the Data Rom Window bits
thatcorrespondto theupperbits of data ROMprogram
space. This register is undefined after reset.
This register is undefined on reset. Neither
read nor single bit instructions may be used to
address this register.
Note. Care is required when handling the DRWR
as it is write only. For this reason, it is not allowed
to change the DRWR contents while executing in-
terrupts drivers, as the driver cannot save and than
restore its previous content. If it is impossible to
avoid the writing of this register in interrupts driv-
ers, an image of this register must be saved in a
RAM location, and each time the program writes
the DRWR it writes also the image register. The im-
age register must be written first, so if an interrupt
occurs between the two instructions the DRWR
register is not affected.
Figure 15. Data ROM Window Memory Addressing
DATA ROM
13 12 11 10 9 8 7 6 5 4 3 2 1 0 PROGRAM SPACE ADDRESS
WINDOW REGISTER 7 6 5 4 3 2 1 0
READ
CONTENTS
(DWR)
5 4 3 2 1 0 DATA SPACE ADDRESS
01
40h-7Fh
IN INSTRUCTION
Example:
DWR=28h 0 0
10
10
00
0 10
110 0
DATA SPACE ADDRESS
1
59h
ROM
ADDRESS:A19h 0 0 1 0 1 0 0 0 0 1 1 0 0 1
®
VR01573B
13/82