
TLC32040 AIC Initialization
4-20
Example 4–2.Setting the TA and TB Registers
;–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
; LOOPAIC.ASM is an example program which shows how to initialize and use
; the TLC32040. The analog output (DAC output) is either a ramp signal
; (RAMPEN=1) or a loopback of the analog input (RAMPEN=0).
;–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
.start ”AICTEST”,0x809802 ; Start assembling here
.sect ”AICTEST” ;
;––––––––––––––––––––––––––––––––––––
; Define constants used by program
;––––––––––––––––––––––––––––––––––––
RAMPEN
.set
1
; Set to 1 to generate ramp at AOUT
T0_ctrl .set
0x808020
; TIM0 gl control
T0_count .set
0x808024
; TIM0 count
T0_prd .set
0x808028
; TIM0 prd
S0_gctrl .set
0x808040
; SP 0 global control
S0_xctrl .set
0x808042
; SP 0 FSX/DX/CLKX port ctl
S0_rctrl .set
0x808043
; SP 0 FSR/DR/CLKR port ctl
S0_xdata .set
0x808048
; SP 0 Data transmit
S0_rdata .set
0x80804C
; SP 0 Data receive
TA
.set
12
; AIC timing register values
TB
.set
15
;
RA
.set 12
;
RB
.set 15 ;
GIE
.set 0x2000
; This bit in ST turns on interrupts
;––––––––––––––––––––––––––––––––––––
; Define some constant storage data
;––––––––––––––––––––––––––––––––––––
A_REG
.word
(TA<<9)+(RA<<2)+0
; A registers
B_REG
.word
(TB<<9)+(RB<<2)+2
; B registers
C_REG
.word
10000011b
; control
S0_gctrl_val
.word
0x0E970300
; Serial port control register
; values
S0_xctrl_val
.word
0x00000111
;
S0_rctrl_val
.word
0x00000111
;
RAMP
.word
0
; RAMP count value
ADC_last
.word
0
; Last received ADC value
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...