
TLC32040 AIC Initialization
4-16
The ’C31 assembly code in Example 4–1 initializes the serial port global con-
trol register (SGCR0) in the following manner:
-
Issuing transmit and receive resets
-
Enabling receive and transmit interrupts
-
Setting 16-bit receive and transmit transfers
-
Setting FSX and FSR, CLKX and CLKR active low
-
Setting continuous mode
-
Setting variable data rate transfers:
Example 4–1.Initialize the Serial Port Global Control Register
SGCR0 .set 808040h
; Serial port 0 global control register ;
SPCX0 .set 808042h
; Serial port 0 FSX/DX/CLKX control reg. ;
SPCR0 .set 808043h
; Serial port 0 FSR/DR/CLKR control reg. ;
SINIT0 .word
0e973300h
; Enable RINT & 16–bit transfers
SINIT1 .word
111h
; Configure as serial port pins
ldp
@SGCR0
; Set Data Page
ldi
0h,R4
; Initialize R4 to zero
sti
R4,@SGCR0
ldi
@SINIT1,R7
; Reset and
sti
R7,@SPCX0
; initialize serial port
sti
R7,@SPCR0
; initialize serial port
ldi
@SINIT0,R7
; Reset and
sti
R7,@SGCR0
; initialize serial port
Refer to the example code supplied with the DSK for help on setting up the AIC.
Initializing the AIC
Once the ’C31 supplies MCLK, initializes its serial port, and resets the AIC, you
can initialize the AIC to a specified sample rate. The AIC sampling rate is deter-
mined by the values of two registers called A and B in the AIC’s transmit and
receive sections. These values are loaded into the respective counter when-
ever the counter counts down to 0. Tx counter A and B determine the D/A con-
version timing, Rx counter A and B determine the A/D conversion timing. For
more information, refer to the
TLC32040 AIC Data Sheet (Literature number
SLAS014). The formula for the conversion frequency is given in Equation 4–1.
Equation 4–1. Conversion Frequency
Conversion frequency
MCLK
A
B
_
=
2
Содержание TMS320C3 Series
Страница 1: ...TMS320C3x DSP Starter Kit User s Guide...
Страница 18: ...1 4...
Страница 28: ...2 10...
Страница 82: ...5 18...
Страница 140: ...Communications Kernel Source Code A 12...
Страница 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 146: ...Schematics B 6...
Страница 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 148: ...Schematics B 8...
Страница 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 150: ...Schematics B 10...
Страница 154: ...B 14...
Страница 160: ...C 6...
Страница 166: ...Index 6...