DSPRelated.com
Forums

AIC INIT again!

Started by Ki-Young Park December 28, 2000

Hi,

As I asked before, I'am trying to implement a simple FIR filter
with 5409 EVM from Spectrum Digital.

I found out that the example code i used was for the
TLC320AC01 as A/D converter
while 5409EVM uses TLC320AC50 as A/D converter.

Is there any source code which works on this A/D converter?

I've tried with SPC2 instead of SPC1 but it gave compile time error.
Compiler(CC1.2) doesn't know about SPC2 while it knows SPC and SPC1. Many thanks.

main_start:
CALL init_54 ; initialize ST0,ST1 PMST
; and other registers
CALL serial_init ; initialize serial port
CALLD aic_init ; initialize AIC
LD #0,DP
NOP

WAIT: B WAIT ; wait for receive interrupt

aic_init:
ANDM #~K_RINT1,IMR
CALLD wrt_cnfg ; initialize AC01
STM #K_RINT1,IFR

STM #K_RINT1,IMR

RETD
STM #K_RINT1,IFR
.end

wrt_cnfg:
STM #K_0,DXR1 ;primary data word - a jump start!
CALL wait_xrdy
STM #K_PRIM_WORD,DXR1 ;send primary word with D01-D00 = 11
to
;signify secondary
communication
CALL wait_xrdy ;wait for data to be copied from DXR to
XSR
STM #K_REG_1,DXR1 ;change A register
CALL wait_xrdy
STM #K_PRIM_WORD,DXR1
CALL wait_xrdy
STM #K_REG_2,DXR1 ;change B register
CALL wait_xrdy
RET
;****************************************************************************
; MODULE: WAIT_XRDY
; PURPOSE: Wait for data to be copied from DXR to XSR before the next
; data is sent to DXR
;****************************************************************************
wait_xrdy:
BITF SPC1,0800h ;test XRDY bit in SPC1
BC wait_xrdy,NTC ;loop if not set <--- fail to pass
this condition*********************
RET