HMS87C5216 ETC1 [List of Unclassifed Manufacturers], HMS87C5216 Datasheet - Page 20

no-image

HMS87C5216

Manufacturer Part Number
HMS87C5216
Description
CMOS SINGLE-CHIP 8-BIT MICROCONTROLLER FOR UR(Universal Remocon) & WIRELESS KEYBOARD
Manufacturer
ETC1 [List of Unclassifed Manufacturers]
Datasheet
HMS87C5216
9.2 Program Memory
A 16-bit program counter is capable of addressing up to 64K
bytes, but these devices have 16K bytes program memory space
only physically implemented. Accessing a location above FFFF
will cause a wrap-around to 0000
Figure 9-4, shows a map of Program Memory. After reset, the
CPU begins execution from reset vector which is stored in ad-
dress FFFE
As shown in Figure 9-4, each area is assigned a fixed location in
Program Memory. Program Memory area contains the user pro-
gram.
Page Call (PCALL) area contains subroutine program to reduce
program byte length by using 2 bytes PCALL instead of 3 bytes
CALL instruction. If it is frequently called, it is more useful to
save program byte length.
Table Call (TCALL) causes the CPU to jump to each TCALL ad-
dress, where it commences the execution of the service routine.
The Table Call service area spaces 2-byte for every TCALL:
0FFC0
Figure 9-6.
H
for TCALL15, 0FFC2
H
Figure 9-4 Program Memory Map
and FFFF
C000H
F000H
FEFFH
FF00H
FFC0H
FFDFH
FFE0H
FFFFH
H
as shown in Figure 9-5.
VECTOR AREA
INTERRUPT
TCALL
AREA
H
for TCALL14, etc., as shown in
H
.
PCALL
AREA
PROGRAM
MEMORY
H
Example: Usage of TCALL
The interrupt causes the CPU to jump to specific location, where
it commences the execution of the service routine. The External
interrupt 0, for example, is assigned to location 0FFFA
terrupt service locations spaces 2-byte interval: 0FFF8
0FFF9
nal Interrupt 0, etc.
As for the area from 0FF00
going to be used, its service location is available as general pur-
pose Program Memory.
LDA
;
;TABLE CALL ROUTINE
;
FUNC_A: LDA
;
FUNC_B: LDA
;
;TABLE CALL ADD. AREA
;
H
Address
0FFE0
for External Interrupt 1, 0FFFA
E2
E4
E6
E8
EA
EC
EE
F0
F2
F4
F6
F8
FA
FC
FE
#5
TCALL 0FH
:
:
RET
RET
ORG
DW
DW
H
Figure 9-5 Interrupt Vector Area
NOTE:
“-” means reserved area.
Timer/Counter 2 Interrupt Vector Area
Timer/Counter 1 Interrupt Vector Area
Timer/Counter 0 Interrupt Vector Area
KEY SCAN Interrupt Vector Area
LRG0
LRG1
0FFC0H
FUNC_A
FUNC_B
RC WT Interrupt Vector Area
EXT2 Interrupt Vector Area
EXT1 Interrupt Vector Area
WDT Interrupt Vector Area
ADC Interrupt Vector Area
BIT Interrupt Vector Area
Vector Area Memory
H
RESET Vector Area
to 0FFFF
2
SEP. 2004 Ver 1.01
-
-
-
-
-
;1BYTE INSTRUCTION
;INSTEAD OF 3 BYTES
;NORMAL CALL
H
1
, if any area of them is not
;TCALL ADDRESS AREA
H
and 0FFFB
H
H
for Exter-
. The in-
H
and

Related parts for HMS87C5216