T5L_ASIC Development Guide
- 23
-
www.dwin-global.com
DWIN Technology
Professional,
Creditable,
S
uccessful
Example
In 11.0592 MHz crystal (corresponding to the main frequency of CPU 206.4384 MHz), T2 1mS
interruption is set to output 500 MHz square wave at P 1.0.
ORG
002BH
;T2 interrupt program entry
LJMP
T21NT
T21NT:
CLR
TF2
;T2 interrupt program
CPL
P1.0
RETI
;Initialization of T2-related SFR
MOV CRCH,#HIGH(48333)
;1mS timer
MOV
CRCL,#LOW(48333)
MOV
T2CON,#71H
;TR2=1
ORL
IEN0,#20H
;ET2=1 turn on T2 interrupt