
TLC32040 AIC Initialization
4-21
Functional Overview
Example 4–2.Setting the TA and TB Registers (Continued)
;****************************************************
; Begin main code loop here
;****************************************************
main or GIE,ST ; Turn on INTS
ldi 0x34,IE ; Enable XINT/RINT/INT2
b main ; Do it again!
;–––––––––––––––––––––––––––––––
DAC2 push ST ; DAC Interrupt service routine
push R3 ;
.if RAMPEN ; If RAMPEN=1 assemble this code
ldi @RAMP,R3 ;
addi 256,R3 ; Add a value to RAMP
sti R3,@RAMP ;
.else ; Else assemble this
ldi @ADC_last,R3 ;
.endif ;
andn 3,R3 ;
sti R3,@S0_xdata ; Output the new DAC value
pop R3 ;
pop ST ;
reti ;
;–––––––––––––––––––––––––––––––
ADC2 push ST ;
push R3 ;
ldi @S0_rdata,R3 ;
sti R3,@ADC_last ;
pop R3 ;
pop ST ;
reti ;
;*****************************************************;
; The startup stub is used during initialization only ;
; and can be safely overwritten by the stack or data ;
;*****************************************************;
.entry ST_STUB ; Debugger starts here
ST_STUB ldp T0_ctrl ; Use kernel data page and stack
ldi 0,R0 ; Halt TIM0 & TIM1
sti R0,@T0_ctrl ;
sti R0,@T0_count ; Set counts to 0
ldi 1,R0 ; Set periods to 1
sti R0,@T0_prd ;
ldi 0x2C1,R0 ; Restart both timers in pulse mode
sti R0,@T0_ctrl ;
;–––––––––––––––––––––
ldi @S0_xctrl_val,R0;
sti R0,@S0_xctrl ; transmit control
ldi @S0_rctrl_val,R0;
sti R0,@S0_rctrl ; receive control
ldi 0,R0 ;
sti R0,@S0_xdata ; DXR data value
ldi @S0_gctrl_val,R0; Setup serial port
sti R0,@S0_gctrl ; global control
Summary of Contents for TMS320C3 Series
Page 1: ...TMS320C3x DSP Starter Kit User s Guide...
Page 18: ...1 4...
Page 28: ...2 10...
Page 82: ...5 18...
Page 140: ...Communications Kernel Source Code A 12...
Page 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 146: ...Schematics B 6...
Page 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 148: ...Schematics B 8...
Page 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 150: ...Schematics B 10...
Page 154: ...B 14...
Page 160: ...C 6...
Page 166: ...Index 6...