HMS8132E/HMS81032TL
Nov. 2001 Ver 2.00
21
Example: The usage software example of Vector address and the initialize part.
ORG
0FFE0H
DW
NOT_USED
DW
NOT_USED
DW
NOT_USED
DW
BIT_INT
; BIT
DW
WDT_INT
; Watch Dog Timer
DW
NOT_USED
DW
NOT_USED
DW
TMR2_INT
; Timer-2
DW
TMR1_INT
; Timer-1
DW
TMR0_INT
; Timer-0
DW
NOT_USED
;
DW
INT2
; Int.2
DW
INT1
; Int.1
DW
KEY_INT
; Key Scan
DW
NOT_USED
;
DW
RESET
; Reset
ORG
08000H
;HMS81032E Program start address
;********************************************
;
MAIN PROGRAM
*
;********************************************
;
RESET:
NOP
CLRG
DI
;Disable All Interrupts
LDX
#0
RAM_CLR:
LDA
#0
;RAM Clear(!0000H->!00BFH)
STA
{X}+
CMPX
#0C0H
BNE
RAM_CLR
;
LDX
#0FFH
;Stack Pointer Initialize
TXSP
LDM
R0, #0
;Normal Port 0
LDM
R0DD,#1000_0010B
;Normal Port Direction
LDM
P0PC,#1000_0010B
;Pull Up Selection Set
LDM
PMR1,#0000_0010B
;R1 port / int
:
:
LDM
CKCTLR,#0011_1101B
;WDT ON, 16mS Time delay after stop mode release
:
:
Summary of Contents for HMS81004E
Page 4: ...HMS81032E HMS81032TL NOV 2001 Ver 2 00...
Page 84: ...HMS81032E HMS81032TL 80 Nov 2001 Ver 2 00...
Page 85: ...APPENDIX...