The GMS81C1404 and GMS81C14 08 are an ad vanced C MOS 8 -bi t microcontroller with 4K/8K bytes of ROM. The Hynix
semiconductor’s GMS81C 1404 and GMS81C1408 are a power ful microcont roller which prov ides a highly flexib le and cost
effective solution to many small applications such as controller for battery charger. The GMS81C1404 and GMS81C1408
provide the followi ng st an dard feat ur es: 4 K/8K bytes of ROM, 192 bytes of RAM, 8-bit t i mer /co un ter , 8 -bi t A/D converter,
10-bit high speed PWM output, programmable buzzer driving port, 8-bit serial communication port, on-chip oscillator and
clock circuitry. In addition, the GMS81C1404 and GMS81C1408 supports power saving modes to reduce power consumption.
Device nameROM SizeEPROM SizeRAM Size
GMS81C14044K bytes-192bytes2.2 ~ 5.5V28 SKDIP or SOP
GMS81C14088K bytes-192bytes2.2 ~ 5.5V28 SKDIP or SOP
GMS87C1404-4K bytes192bytes2.5 ~ 5.5V28 SKDIP or SOP
GMS87C1408-8K bytes192bytes2.5 ~ 5.5V28 SKDIP or SOP
1.2 Features
• 4K/8K Bytes On-chip Program Memory
• 192 Bytes of On-chip Data RAM
(Included stack memory)
• Instruction Cycle Time:
- 250nS at 8MHz
• 23 Programmable I/O pins
(LED direct driving can be source and sink)
• 2.2V to 5.5V Wide Operating Range
• One 8-bit A/D Converter
• One 8-bit Basic Interval Timer
• Four 8-bit Timer / Counters
• Two 10-bit High Speed PWM Outputs
• Watchdog timer (can be operate with internal
RC-oscillation)
Operatind
Voltage
• One 8-bit Serial Peripheral Interface
• Twelve Interrupt sources
- External input: 4
- A/D Conversion: 1
- Serial Peripheral Interface: 1
- Timer: 6
• One Programmable Buzzer Driving port
- 500Hz ~ 130kHz
• Oscillator Type
- Crystal
- Ceramic Resonator
• Noise Immunity Circuit
- Power Fail Processor
• Power Down Mode
- STOP mode
- Wake-up Timer mode
Package
June. 2001 Ver 1.2 1
GMS81C1404/GMS81C1408
1.3 Development Tools
The GMS81C1404 and GMS81C1408 are supported by a
full-featured macro assembler, an in-circuit emulator
CHOICE-Dr
TM
.
1.4 Ordering Information
ROM SizePackage TypeOrdering Device CodeOperating Temperature
28SKDIPGMS81C1404 SK
4K bytes
8K bytes
4K bytes (OTP)
8K bytes (OTP)
28SOPGMS81C1404 D
28SKDIPGMS81C1404E SK
28SOPGMS81C1404E D
28SKDIPGMS81C1408 SK
28SOPGMS81C1408 D
28SKDIPGMS81C1408E SK
28SOPGMS81C1408E D
28SKDIPGMS87C1404 SK
28SOPGMS87C1404 D
28SKDIPGMS87C1408 SK
28SOPGMS87C1408 D
In Circuit Emulators
Assembler
OTP Writer
OTP Devices
CHOICE-Dr.
HME Macro Assembler
Single Writer : Dr. Writer
4-Gang Writer : Dr.Gang
GMS87C1404 SK (Skinny DIP)
GMS87C1404 D (SOP)
GMS87C1408 SK (Skinny DIP)
GMS87C1408 D (SOP)
: Input to the inverting oscillator amplifier and input to
IN
the internal main clock operating circuit.
X
: Output from the inverting oscillator amplifier.
OUT
RA0~RA7: RA is an 8-bit, CMOS, bidirectional I/O port.
RA pins can be used as outputs or inputs according to “1”
or “0” written the their Port Direction Register(RAIO).
Port pinAlternate function
RA0
RA1
RA2
RA3
RA4
RA5
RA6
RA7
EC0 ( Event Counter Input Source )
AN1 ( Analog Input Port 1 )
AN2 ( Analog Input Port 2 )
AN3 ( Analog Input Port 3 )
AN4 ( Analog Input Port 4 )
AN5 ( Analog Input Port 5 )
AN6 ( Analog Input Port 6 )
AN7 ( Analog Input Port 7 )
Table 5-1 RA Port
In addition, RA serves the functions of the various special
features in Table 5-1 .
RB0~RB7: RB is a 8-bit, CMOS, bidirectional I/O port.
RB pins can be used as outputs or inputs according to “1”
or “0” written the their Port Direction Register(RBIO).
RC3~RC6: RC is a 4-bit, CMOS, bidirectional I/O port.
RC pins can be used as outputs or inputs according to “1”
or “0” written the their Port Direction Register(RCIO).
RC serves the functions of the serial interface following
special features in Table 5-3 .
Port pinAlternate function
RC3
RC4
RC5
RC6
SRDYIN
SRDYOUT
SCKI (SPI CLK Input)
SCKO (SPI CLK Output)
SIN (SPI Serial Data Input)
SOUT (SPI Serial Data Output)
(SPI Ready Input)
(SPI Ready Output)
Table 5-3 RC Port
RD0~RD2: RD is a 3-bit, CMOS, bidirectional I/O port.
RC pins can be used as outputs or inputs according to “1”
or “0” written the their Port Direction Register(RDIO).
RD serves the functions of the external interrupt following
special features in Table 5-4
Port pinAlternate function
RD0
RD1
RD2
INT2 (External Interrupt Input Port 2)
INT3 (External Interrupt Input Port 3)
Table 5-4 RD Port
RB serves the functions of the va rious following special
features
in
Table 5-2
Port pinAlternate function
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
AN0 ( Analog Input Port 0 )
AVref ( External Analog Reference Pin )
BUZ ( Buzzer Driving Output Port )
INT0 ( External Interrupt Input Port 0 )
INT1 ( External Interrupt Input Port 1 )
PWM0 (PWM0 Output)
COMP0 (Timer1 Compare Output)
PWM1 (PWM1 Output)
COMP1 (Timer3 Compare Output)
EC1 (Event Counter Input Source)
TMR2OV (Timer2 Overflow Output)
External Event Counter input 0
Analog Input Port 1
Analog Input Port 2
Analog Input Port 3
Analog Input Port 4
Analog Input Port 5
Analog Input Port 6
Analog Input Port 7
Analog Input Port 0 / Analog Reference
Buzzer Driving Output
External Interrupt Input 0
External Interrupt Input 1
PWM0 Output or Timer1 Compare Output
PWM1 Output or Timer3 Compare Output
External Event Counter input 1
Timer2 Overflow Output
SPI READY Input/Output
SPI CLK Input/Output
SPI DATA Input
SPI DATA Output
External Interrupt Input 2
External Interrupt Input 3
Supply voltage...........................................-0.3 to +6.0 V
Storage Temperature ................................-40 to +125 °C
Voltage on any pin with respect to Ground (V
SS
)
................................ ............................... -0.3 to VDD+0.3
Maximum current out of V
Maximum current into V
Maximum current sunk by (I
Maximum output current sourced by (I
pin........................200 mA
SS
pin ..........................150 mA
DD
per I/O Pin) ........25 mA
OL
per I/O Pin)
OH
...............................................................................15 mA
Maximum current (ΣI
) ....................................150 mA
OL
7.2 Recommended Operating Conditions
Maximum current (ΣI
Stresses above those listed under “Absolute Maxi-
Note:
mum Ratings” may cause perma nent damage to the
device. This is a stress rat ing only and functional op eration of the device at any other conditions above
those indicated in the operational sections of this
specification is not implied. Exposure to absolute
maximum rating cond itions for extended pe riods
may affect device reliability.
)....................................100 mA
OH
ParameterSymbolCondition
Supply Voltage
Operating Frequency
Operating Temperature
V
T
f
XIN
OPR
DD
7.3 A/D Converter Characteristics
(TA=25°C, VSS=0V, VDD=5.12V @
ParameterSymbolCondition
Analog Input Voltage Range
Analog Power Supply Input Voltage Range
Overall Accuracy
Non-Linearity Error
Differential Non-Linearity Error
Zero Offset Error
Full Scale Error
Gain Error
Conversion Time
AV
Input CurrentI
REF
f
=8MHz, VDD=3.072V @
XIN
f
=8MHz
XIN
=4.2MHz
f
XIN
VDD=4.5~5.5V
V
=2.2~5.5V
DD
V
AIN
V
REF
N
ACC
N
NLE
N
DNLE
N
ZOE
N
FSE
N
NLE
T
CONV
REF
Specifications
Unit
Min.Max.
4.55.5V
2.25.5V
18MHz
14.2MHz
-20 (-40 for GMS81C140XE)85
f
=4MHz)
XIN
C
°
Specifications
Unit
Min.Typ.Max.
AVREFS=0
AVREFS=1
VDD=5V
V
=3V
DD
f
=8MHz
XIN
f
=4MHz
XIN
V
SS
V
SS
-
-
3-
2.4-
-
-
-
-
-
-
±
±
±
±
±
±
1.0
1.0
1.0
0.5
0.25
1.0
--10
--20
V
DD
V
REF
V
DD
V
DD
1.5LSB
±
1.5LSB
±
1.5LSB
±
1.5LSB
±
0.5LSB
±
1.5LSB
±
V
V
V
µ
AVREFS=1-0.51.0mA
S
12
June. 2001 Ver 1.2
7.4 DC Electrical Characteri stics
GMS81C1404/GMS81C1408
(TA=-20~85°C for GMS81C1404/1408 or TA=-40~85°C for GMS81C1404E/1408E, VDD=2.2~5.5V, VSS=0V)
(TA=-20~85°C for GMS81C1404/1408 or TA=-40~85°C for GMS81C1404E/1408E, VDD=5V±10%, VSS=0V)
ParameterSymbolPins
Operating Frequency
External Clock Pulse Width
External Clock Transition Time
Oscillation Stabilizing Time
External Input Pulse Width
RESET Input Width
X
IN
f
CP
t
CPW
t
RCP,tFCP
t
ST
t
EPW
t
RST
X
IN
X
IN
X
IN
XIN, X
OUT
INT0, INT1, INT2, INT3
EC0, EC1
RESET8--
t
t
1/f
SYS
CP
t
RCP
t
CPW
RST
t
FCP
t
CPW
Specifications
Unit
Min.Typ.Max.
1-8MHz
80--nS
--20nS
--20mS
2--
-0.5V
V
DD
0.5V
t
t
SYS
SYS
RESET
INT0, INT1
INT3
INT2,
EC0,
EC1
t
EPW
t
EPW
Figure 7-1 Timing Chart
0.2V
0.2V
DD
DD
0.8V
DD
14
June. 2001 Ver 1.2
7.6 Typical Characteristics
GMS81C1404/GMS81C1408
This graphs and tables provided in this section are for design guidance only and are not tested or guaranteed.
In some graphs or tables the data presented are outside specified operating range (e.g. outside specified
VDD range). This is for information only and devices
are guaranteed to operate properly only within the
specified range.
Operating Area
f
XIN
(MHz)
Ta= 25°C
10
8
6
4
2
0
23
45
V
DD
(V)
6
STOP Mode
I
DD
(µA)
I
0.8
0.6
0.4
STOP
f
= 8MHz
XIN
V
−
DD
-40°C
25°C
85°C
The data presented in this s ection is a statistical s ummary
of data collected on units from different lots over a period
of time. “Typical” represents the mean of the distribution
while “max” or “min” represents (mean + 3σ) and (mean −
3σ) respectively where σ is standard deviation
Supply voltage...........................................-0.3 to +6.0 V
Storage Temperature ................................-40 to +125 °C
Voltage on any pin with respect to Ground (V
SS
)
................................ ............................... -0.3 to VDD+0.3
Maximum current out of V
Maximum current into V
Maximum current sunk by (I
Maximum output current sourced by (I
pin........................200 mA
SS
pin ..........................150 mA
DD
per I/O Pin) ........25 mA
OL
per I/O Pin)
OH
...............................................................................15 mA
Maximum current (ΣI
) ....................................150 mA
OL
8.2 Recommended Operating Conditions
Maximum current (ΣI
Note: Stresses above those listed under “Absolute Maxi-
mum Ratings” may cause perma nent damage to the
device. This is a stress rat ing only and functional op eration of the device at any other conditions above
those indicated in the operational sections of this
specification is not implied. Exposure to absolute
maximum rating cond itions for extended pe riods
may affect device reliability.
)....................................100 mA
OH
ParameterSymbolCondition
T
V
f
XIN
OPR
DD
Supply Voltage
Operating Frequency
Operating Temperature
8.3 A/D Converter Characteristics
(TA=25°C, VSS=0V, VDD=5.12V @
ParameterSymbolCondition
Analog Input Voltage Range
Analog Power Supply Input Voltage Range
Overall Accuracy
Non-Linearity Error
Differential Non-Linearity Error
Zero Offset Error
Full Scale Error
Gain Error
Operating Frequency
External Clock Pulse Width
External Clock Transition Time
Oscillation Stabilizing Time
External Input Pulse Width
RESET Input Width
X
IN
f
CP
t
CPW
t
RCP,tFCP
t
ST
t
EPW
t
RST
X
IN
X
IN
X
IN
XIN, X
OUT
INT0, INT1, INT2, INT3
EC0, EC1
RESET8--
t
t
1/f
SYS
CP
t
RCP
t
CPW
RST
t
FCP
t
CPW
Specifications
Unit
Min.Typ.Max.
1-8MHz
80--nS
--20nS
--20mS
2--
-0.5V
V
DD
0.5V
t
t
SYS
SYS
RESET
INT0, INT1
INT3
INT2,
EC0,
EC1
t
EPW
t
EPW
Figure 8-1 Timing Chart
0.2V
0.2V
DD
DD
0.8V
DD
June. 2001 Ver 1.2 19
GMS81C1404/GMS81C1408
8.6 Typical Characteristics
This graphs and tables provided in this section are for design guidance only and are not tested or guaranteed.
In some graphs or tables the data presented are outside specified operating range (e.g. outside specified
VDD range). This is for information only and devices
are guaranteed to operate properly only within the
specified range.
Operating Area
f
XIN
(MHz)
Ta= 25°C
10
8
6
4
2
0
23
45
V
DD
(V)
6
STOP Mode
I
DD
(µA)
I
0.8
0.6
0.4
STOP
f
= 8MHz
XIN
V
−
DD
-25°C
25°C
85°C
The data presented in this s ection is a statistical s ummary
of data collected on units from different lots over a period
of time. “Typical” represents the mean of the distribution
while “max” or “min” represents (mean + 3σ) and (mean −
3σ) respectively where σ is standard deviation
Normal Operation
I
V
−
DD
Ta=25°C
23
DD
f
XIN
= 8MHz
4MHz
45
V
DD
(V)
6
I
DD
(mA)
8
6
4
2
0
Wake-up Timer Mode
I
DD
(mA)
2.0
1.5
1.0
I
WKUP
Ta=25°C
V
−
DD
f
= 8MHz
XIN
20
0.2
0
23
RC-WDT in Stop Mode
I
DD
(µA)
20
15
10
5
0
I
RCWDT
Ta=25°C
23
V
−
T
RCWDT
DD
45
= 80uS
45
0.5
V
DD
(V)
6
V
DD
(V)
6
0
23
4MHz
V
DD
(V)
45
6
June. 2001 Ver 1.2
GMS81C1404/GMS81C1408
I
OL
I
OL
(mA)
40
30
20
10
0
V
V
−
DD
IH1
V
IH1
f
=4MHz
XIN
(V)
Ta=25°C
4
3
2
, VDD=5V
V
−
OL
12345
XIN, RESET
I
OH
I
OH
-25°C
25°C
85°C
V
OL
(V)
V
V
−
DD
IH2
V
IH2
f
=4kHz
XIN
(V)
Ta=25°C
4
3
2
(mA)
-20
-15
-10
-5
0
Hysteresis input
, VDD=5V
V
−
OH
V
23456
V
V
−
DD
IH3
V
IH3
f
=4kHz
XIN
(V)
Ta=25°C
4
3
2
-25°C
OH
(V)
Normal input
25°C
85°C
V
(V)
IL2
1
0
V
4
3
2
1
0
23
V
−
DD
f
=4kHz
XIN
Ta=25°C
23
45
IL2
Hysteresis input
45
V
DD
(V)
6
V
DD
(V)
6
1
0
1
23
V
V
−
DD
V
IL1
f
=4MHz
XIN
(V)
Ta=25°C
4
3
2
1
0
1
23
45
IL1
XIN, RESET
45
V
DD
(V)
6
V
DD
(V)
6
V
(V)
IL3
1
0
V
4
3
2
1
0
23
V
−
DD
f
=4kHz
XIN
Ta=25°C
23
IL3
Normal input
45
45
V
DD
(V)
6
V
DD
(V)
6
June. 2001 Ver 1.2 21
GMS81C1404/GMS81C1408
9. MEMORY ORGANIZATION
The GMS81C1404 and GMS81C1408 have separate address spaces for Program memory and Data Memory. Pro gram memory can only be read, not written to. It can be up
9.1 Registers
This device has six registers that are the Program Counter
(PC), a Accumulator (A), two index registers (X, Y), the
Stack Pointer (SP), and the Program Status Word (PSW).
The Program Counter consists of 16-bit register.
A
X
Y
SP
PCLPCH
PSW
Figure 9-1 Configuration of Registers
Accumulator: The Accumulato r is the 8-bit gen eral purpose register, used for data operation such as transfer, temporary saving, and conditional judgement, etc.
The Accumulator can be used as a 16-bit register with Y
Register as shown below.
ACCUMULATOR
X REGISTER
Y REGISTER
STACK POINTER
PROGRAM COUNTER
PROGRAM STATUS
WORD
to 4K /8K bytes of Prog ram memor y. Data memory ca n be
read and written to up to 192 bytes including the stack area.
Generally, SP is automatically updated when a subrout ine
call is executed or an interrupt is accepted. However, if it
is used in excess of the stack area permitted by the data
memory allocating configuration, the us er-processed data
may be lost.
The stack can be located at any position within 00
to BF
H
of the internal data memory. The SP is not initialized by
hardware, requiring to write the initial value (the location
with which the use of the stack starts) by using the initialization routine. Normally, the initial value of “BF
H
” is
used.
Stack Address (000
15087
0
Hardware fixed
The Stack Pointer must be initi alized by softwa re be-
Note:
cause its value is undefined after RESET.
Example: To initialize the SP
LDX#0BFH
TXSP; SP ← BFH
~ 0BFH)
H
SP
H
Y
YA
A
Two 8-bit Registers can be used as a “YA” 16-bit Register
Figure 9-2 Configuration of YA 16 -bit Register
X, Y Registers: In the addressing mode which uses these
index registers, the register conten ts a re added to the specified address, which becomes the actual address. These
modes are extremely effective for referencing subroutine
tables and memory tables . The index regi sters also h ave increment, decrement, comparison and data transfer functions, and they can be used as simple accumulators.
Stack Pointer: The Stack Pointer is an 8-bit register used
for occurrence interrupts and calling out subroutines. Stack
Pointer identifies the location in the stack to be accessed
(save or restore).
22
Program Counter: The Program Counter is a 16-bit wide
which consists of two 8-bit regist ers, PCH and PCL. This
counter indicates the address of the next instruction to be
executed. In reset state, the program counter has reset routine address (PC
:0FFH, PCL:0FEH).
H
Program Status Word: The Program Status Word (PSW)
contains several bits that reflect the current state of the
CPU. The PSW is described in Figure 9-3 . It contains the
Negative flag, the Overflow flag, the Break flag the Half
Carry (for BCD operation), the Interrupt enable flag, the
Zero flag, and the Carry flag.
[Carry flag C]
This flag stores any carry or borrow from the ALU of CPU
after an arithmetic operation and is also changed by the
Shift Instruction or Rotate Instruction.
[Zero flag Z]
This flag is set when the result of an arithmetic operation
or data transfer is “0” and is cleared by any other result.
June. 2001 Ver 1.2
PSW
MSBLSB
N
V-BHIZC
RESET VALUE: 00
GMS81C1404/GMS81C1408
H
NEGATIVE FLAG
OVERFLOW FLAG
BRK FLAG
Figure 9-3 PSW (Program Status Word) Register
[Interrupt disable flag I]
This flag enables/disables all interrupts except interrupt
caused by Reset or software BRK instruction. All interrupts are disabled when cleared to “0”. This flag immediately becomes “0” when an interrupt is served. It is set by
the EI instruction and cleared by the DI instruction.
[Half carry flag H]
After operation, this is set when there is a carry from bit 3
of ALU or there is no borrow from bit 4 of ALU. This bit
can not be set or cleared except CLRV instruction with
Overflow flag (V).
[Break flag B]
This flag is set by software BRK instruction to distinguish
BRK from TCALL instruction with the same vector ad-
CARRY FLAG RECEIVES
CARRY OUT
ZERO FLAG
INTERRUPT ENABLE FLAG
HALF CARRY FLAG RECEIVES
CARRY OUT FROM BIT 1 OF
ADDITION OPERLANDS
dress.
[Overflow flag V]
This flag is set to “1” when an overflow occurs as the result
of an arithmetic operation involving signs. An overflow
occurs when the result of an addition or subtraction exceeds +127(7F
) or -128(80H). The CLRV instruction
H
clears the overflow flag. There is no set instruction. When
the BIT instruction is executed, bit 6 of memory is copied
to this flag.
[Negative flag N]
This flag is set to match the sign bit (bit 7) status of the re-
sult of a data or arithmetic operation. When the BIT instruction is executed, bit 7 of memory is copied to this flag.
June. 2001 Ver 1.2 23
GMS81C1404/GMS81C1408
9.2 Program Memory
A 16-bit program counter is capable of addressing up to
64K bytes, but these devices have 4K/8K bytes program
memory space only physically implemented. Accessing a
location above FFFF
will cause a wrap-around to 0000H.
H
Figure 9-4 , shows a map of Progr am Memory. After reset ,
the CPU begins execution from reset vector which is stored
in address FFFE
and FFFFH as shown in Figure 9-5 .
H
As shown in Figure 9-4 , each area is assigned a fixed location in Program M emory. Program Memory area contains the user program.
E000H
GMS81C1408
F000H
GMS81C1404
FEFFH
FF00H
FFC0H
FFDFH
FFE0H
FFFFH
TCALL
AREA
INTERRUPT
VECTOR AREA
PROGRAM
MEMORY
PCALL
AREA
Example: Usage of TCALL
LDA#5
TCALL 0FH;
:;
:;
;
;TABLE CALL ROUTINE
;
FUNC_A: LDALRG0
RET
;
FUNC_B: LDALRG1
RET
;
;TABLE CALL ADD. AREA
;
ORG0FFC0H;
DWFUNC_A
DWFUNC_B
1BYTE INSTRUCTION
INSTEAD O F 3 BYTES
NORMAL CALL
1
2
TCALL ADDRESS AREA
The interrupt causes the CPU to jum p to specific location,
where it commences the execution of the service routine.
The External interrupt 0, for example, is assigned to location 0FFFA
interval: 0FFF8
0FFFA
As for the area from 0FF00
. The interrupt service locations spaces 2-byte
H
and 0FFF9H for External Interru pt 1,
H
and 0FFFBH for External Interrupt 0, etc.
H
to 0FFFFH, if any area of
H
them is not going to be used, its s ervice location is available as general purpose Program Memory.
Figure 9-4 Program Memory Map
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) c auses the CPU to jump to each
TCALL address, where it commences the execution of the
service routine. The Table Call service area spaces 2-byte
for every TCALL: 0FFC0
for TCALL15, 0FFC2H for
H
TCALL14, etc., as shown in Figure 9-6 .
AddressVector Area Memory
0FFE0
H
E2
E4
Serial Peripheral Interface Interrupt Vector Area
E6
E8
EA
EC
EE
F0
F2
F4
F6
F8
FA
FC
FE
NOTE:
“-” means reserved area.
Basic Interval Interrupt Vector Area
Watchdog Timer Interru pt Ve ctor Area
A/D Converter Interrupt Vector Area
Timer/Counter 3 Interrupt Vector Area
Timer/Counter 2 Interrupt Vector Area
External Interrupt 3 Vector Area
External Interrupt 2 Vector Area
Timer/Counter 1 Interrupt Vector Area
Timer/Counter 0 Interrupt Vector Area
External Interrupt 1 Vector Area
External Interrupt 0 Vector Area
RESET Vector Area
-
-
-
Figure 9-5 Interrupt Vector Area
24
June. 2001 Ver 1.2
AddressPCALL Area Memory
0FF00
H
PCALL Area
(256 Bytes)
0FFFF
H
GMS81C1404/GMS81C1408
AddressProgram Memory
0FFC0
H
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF
D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF
NOTE:
* means that the BRK software interrupt is using
same address with TCALL0.
TCALL 15
TCALL 14
TCALL 13
TCALL 12
TCALL 11
TCALL 10
TCALL 9
TCALL 8
TCALL 7
TCALL 6
TCALL 5
TCALL 4
TCALL 3
TCALL 2
TCALL 1
TCALL 0 / BRK *
Figure 9-6 PCALL and TCALL Memory Area
PCALL→ rel
4F35PCALL 35H
~
~
0FF00H
0FF35H
0FFFFH
4F
35
NEXT
~
~
TCALL→ n
4ATCALL 4
4A
~
~
0F125H
0FF00H
0FFD6H
0FFD7H
0FFFFH
NEXT
25
F1
01001010
~
~
PC:
11111111
FHFHDH6
➌
Reverse
➊
11010110
➋
H
June. 2001 Ver 1.2 25
GMS81C1404/GMS81C1408
Example: The usage software example of Vector address and the initialize part.
;********************************************
; MAIN PROGRAM *
;*******************************************
;
RESET:DI;Disable All Interrupts
RAM_CLR: LDA#0;RAM Clear(!0000H->!00BFH)
;
;
;
LDX#0
STA{X}+
CMPX#0C0H
BNERAM_CLR
LDX#0BFH;Stack Pointer Initialize
TXSP
CALLINITIAL;
LDMRA, #0;Normal Port A
LDMRAIO,#1000_0010B;Normal Port Direction
LDMRB, #0;Normal Port B
LDMRBIO,#1000_0010B;Normal Port Direction
:
:
LDMPFDR,#0;Enable Power Fail Detector
:
:
26
June. 2001 Ver 1.2
Loading...
+ 65 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.