44
MOTOROLA
6.7.2
General purpose IO output
The following routine can be used to write the TIO1 output pin:
movep #$02800000,x:TCSR1
;clear TC2-TC0, set GPIO
;and set DIR for GPIO output, set TIO1 to 0
movep #$02a00000,x:TCSR1
; set TIO1 to 1
movep #$02800000,x:TCSR1
; set TIO1 to 0
This routine generates a pulse on the TIO1 pin with the duration equal to 8 CLK (assuming
no wait states, no external bus conflict etc.)
6.7.3
Standard timer mode (mode 0), input clock, no output and GPIO output
The following program illustrates the standard timer mode with simultaneous GPIO. The
timer is used to activate an internal task after 65536 clocks; at the end of the task the TIO0
pin is toggled to signal end of task.
org p:$14
; this is timer 0 interrupt vector address
jsr task
; go and execute task (long interrupt)
....
org p:main_body
.....
movep #$42000000,x:TCSR0
; enable timer interrupts and enable GPIO
; (input!) and set DO =0 to have stable data
movep #$42800000,x:TCSR0
; change DIR to output (clean 0, no spikes)
movep #$0000ffff,x:TCR0
; load 64k -1 into the counter
bset #24,x:IPR
; enable IPL for timer 0
andi #$cf,mr
; remove interrupt masking in status register
bset #31,x:TCSR0
; timer enable
......
; application program
.....
task
.....
; task instructions
....
end_of_task
bset #22,x:TCSR0
; set TIO0 to signal end of task
bclr #22,x:TCSR0
; clear TIO0
rti
; return to main program
Summary of Contents for DSP96002
Page 3: ...1 2 DSP96002 USER S MANUAL MOTOROLA ...
Page 38: ...MOTOROLA DSP96002 USER S MANUAL 3 15 Figure 3 4 Modulo Arithmetic Unit Block Diagram ...
Page 39: ...3 16 DSP96002 USER S MANUAL MOTOROLA ...
Page 53: ...4 14 DSP96002 USER S MANUAL MOTOROLA ...
Page 76: ...MOTOROLA DSP96002 USER S MANUAL 5 23 Figure 5 8 Address Modifier Summary ...
Page 86: ...6 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 101: ...MOTOROLA DSP96002 USER S MANUAL 7 15 Figure 7 9 HI Block Diagram One Port ...
Page 140: ...7 54 DSP96002 USER S MANUAL MOTOROLA ...
Page 166: ...9 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 181: ...MOTOROLA DSP96002 USER S MANUAL 10 15 Figure 10 8 Program Address Bus FIFO ...
Page 337: ...MOTOROLA DSP96002 USER S MANUAL A 149 ...
Page 404: ...A 216 DSP96002 USER S MANUAL MOTOROLA PC xxxx D ...
Page 460: ...A 272 DSP96002 USER S MANUAL MOTOROLA SIOP Not affected ...
Page 484: ...A 296 DSP96002 USER S MANUAL MOTOROLA SSH PC SSL SR SP 1 SP ...
Page 519: ...MOTOROLA DSP96002 USER S MANUAL A 331 ...
Page 718: ...MOTOROLA DSP96002 USER S MANUAL B 199 ...
Page 871: ... MOTOROLA INC 1994 MOTOROLA TECHNICAL DATA SEMICONDUCTOR M Addendum ...
Page 888: ...MOTOROLA INDEX 1 INDEX ...
Page 889: ......