SOFTWARE EXAMPLES
7 - 18
DSP56002 TIMER AND EVENT COUNTER
MOTOROLA
JSET
#DI,X:TCSR,here
;spin here until TIO is set
7.8.2
General Purpose I/O Output
The following routine can be used to write the TIO output pin:
MOVEP
#$000140,X:TCSR
;clear TC2-TC0, set GPIO and
;set DIR for GPIO output, set TIO to 0
BSET
#DO,X:TCSR
;set TIO to 1
NOP
TE
TCR
Write Preload (N)
TIO (Event)
Counter
N
FFFF
0
Interrupt
First Event
Last Event
N+1
N
N+1
FFFF
0
Figure 7-13 Standard Timer Mode, External Clock (INV=1)
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..