Sine-Wave Generator and Loopback Program
3-6
initwork .word 0 ; workspace for initialization
.text
start: intm = 1 ; disable all interrupts
pmst = #01a0h ; Interrupt pointer maps vectors to address 180h
sp = #0ffah ; stack pointer located in Communications Kernel
imr = #240h ; unmask TDM RINT and HPIINT(host port interface)
OVM = 0 ; OVM = 0 (do not clip overflow)
ASM = #0 ; ASM = 0 (shift=0)
DP = #0
AC01INIT:
; initialize serial port and ad50-evm on-board logic
ar1 = #initwork ; workspace for storing value to be output to ad50-evm
*ar1 = #0010b ; switch on one AD50 and hold it in reset
port(0) = *ar1 ; write the data to i/o port 0
repeat(#23) ; hold reset low for at least 6 mclk cycles
nop ; (4 dsp clock cycles == 1 mclk cycle)
tcr = #10h ; stop timer
imr = #240h ; unmask RXINT and HPIINT
tspc = #0008h ; stop TDM serial port
tdxr = #0h ; send 0 as first xmit word
tspc = #00c8h ; reset and start TDM serial port
*ar1 = #0011b ; bring ad50 out of reset with one channel powered up
port(0) = *ar1
; initialize ad50 registers
a = #0000010010010000b ; register 4
call ad50init ; change fsamp to 20kHz
a = #0000001011000000b ; register 4
call ad50init ; light led
; a = #0000000100000001b ; select 16 bit dac mode
; call ad50init ; this must be the last command
intm = 0 ; enable all interrupts
WAIT idle(1) ; idle waiting for interrupts
nop
goto WAIT
;-------------------------------------------------------------------------------
; ad50 init routines here
ad50init
ifr = #080h ; clear flag from IFR
tdxr = #01h ; request secondary when AD50 starts
call waitfortdx ; wait for primary to xmit
tdxr = a ; send register value to serial port
ifr = #080h ; clear flag from IFR
call waitfortdx ; wait for secondary to xmit
tdxr = #0h ; send neutral state in case last init
ifr = #080h ; clear flag from IFR
call waitfortdx ; wait for neutral state to xmit
Summary of Contents for SLAU039
Page 6: ...vi ...
Page 16: ...1 6 ...
Page 26: ...2 10 ...
Page 34: ...3 8 ...
Page 40: ...4 6 ...
Page 47: ...Circuit Diagrams A 7 Installing the AD50 EVM A 4 Circuit Diagrams ...
Page 48: ...A 8 ...
Page 49: ...A 9 Installing the AD50 EVM ...
Page 50: ...A 10 ...
Page 51: ...PCB Diagrams A 11 Installing the AD50 EVM A 5 PCB Diagrams Top Side Silkscreen ...
Page 52: ...A 12 1 Top Side Tracks Top Side Tracks ...
Page 53: ...A 13 Installing the AD50 EVM Bottom Side Tracks ...
Page 54: ...A 14 Ground plane ...
Page 55: ...A 15 Installing the AD50 EVM Power plane ...
Page 56: ...A 16 ...