
TLC32040 AIC Initialization
4-22
Example 4–2.Setting the TA and TB Registers (Continued)
;======================================================;
; This section of code initializes the AIC ;
;======================================================;
AIC_INIT LDI
0x10,IE
; Enable only XINT interrupt
andn
0x34,IF
;
ldi
0,R0
;
sti
R0,@S0_xdata
;
RPTS
0x040
;
LDI
2,IOF
; XF0=0 resets AIC
rpts
0x40
;
LDI
6,IOF
; XF0=1 runs AIC
;–––––––––––––––––––––
ldi
@C_REG,R0
; Setup control register
call
prog_AIC
;
ldi
0xfffc ,R0
; Program the AIC to be real slow
call
prog_AIC
;
ldi
0xfffc|2,R0
;
call
prog_AIC
;
ldi
@B_REG,R0
; Bump up the Fs to final rate
call
prog_AIC
; (smallest divisor should be last)
ldi
@A_REG,R0
;
call
prog_AIC
;
b
main
;–––––––––––––––––––––––––––––––
prog_AIC
ldi
@S0_xdata,R1
; Use original DXR data during 2 ndy
sti
R1,@S0_xdata
;
idle
ldi
@S0_xdata,R1
; Use original DXR data during 2 ndy
or
3,R1
; Request 2 ndy XMIT
sti
R1,@S0_xdata
;
idle
;
sti
R0,@S0_xdata
; Send register value
idle
;
andn
3,R1
;
sti
R1,@S0_xdata
; Leave with original safe value in DXR
;–––––––––––––––––––––
ldi
@S0_rdata,R0
; Fix the receiver underrun by reading
rets
main ; the DRR before going to the main loop
;****************************************************;
; Install the XINT/RINT ISR handler directly into ;
; the vector RAM location it will be used for ;
;****************************************************;
.start ”SP0VECTS”,0x809FC5
.sect
”SP0VECTS”
B
DAC2
; XINT0
B
ADC2
; RINT0
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...