EasyManua.ls Logo

Dwin T5L ASIC Series - Page 23

Dwin T5L ASIC Series
41 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
T5L_ASIC Development Guide
- 23
-
www.dwin-global.com
D
WI
N
T
echnology
Pro
f
essional
,
Credi
t
able
,
Success
f
ul
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