Reply by usman98_et_01 March 31, 20062006-03-31
Hello

I want to make a prject for looping back data from Adc to ADSP 21065L
and back through dacs via SPORT0 in I2s mode.Becuase i have found two
assembly code files in a document on internet.Now I want to make a
VDSP project using these files.

I am using two assembly files one for

1)init.asm
SPORT0 I2S Mode Initialization which contains assembly routines set
up the ADSP-21065L SPORT1 registers for I2S mode for */
/* transmitting and recieving of data in slave mode at 96 KHz.
This contains assembly routines like
"Program_DMA_Controller_SPT1" and "Program_I2Smode_SPORT1_Registers"

2)interrupt_service.asm
SPORT0 I2S RX INTERRUPT SERVICE ROUTINE
Receives AKM ADC data from SPORT1 I2S RX pins and then sends the
audio data back out to the AKM DAC
Line Outputs.This routine contains functions such as
1)get_ADC_i2s_rx_data
2)tx_audio_data_out_I2S

Now I want to utilize these two files in a project.i have created a
project and created a new file named main.asm in which i want to call
the assembly routines created in two assembly files.
The main program flow is like this.In _main routine
1)First the functions Program_DMA_Controller_SPT1 and
Program_I2Smode_SPORT1_Registers are called to initialize and
configure the serial port in i2s mode
2)The serial port interrupt SPR0I is enabled
3)The functions get_ADC_i2s_rx_data and tx_audio_data_out_I2S are
called every time the interrupt
SPR0I occurs.

So my main program is like this.

//file main.asm
//this file will call functions in the two assembly files.

#include
#include
.GLOBAL _main;
.EXTERN Program_I2Smode_SPORT1_Registers;
.EXTERN Program_DMA_Controller_SPT1;
.EXTERN get_ADC_i2s_rx_data;
.EXTERN tx_audio_data_out_I2S;
.section /pm pm_code;
_main:
CALL Program_I2Smode_SPORT1_Registers;
call Program_DMA_Controller_SPT1;
bit set imask SPR1I;
//SIG_SPR0I;
if ne jump get_ADC_i2s_rx_data ;
if ne jump tx_audio_data_out_I2S;
_main.end:

I am new to assembly programming .I shall be grteful if u can guide
me regarding the correct assembly code that should be placed here.
i am confused about enabling interrupt for receiiving data from
SPORT0 and how the function that is pointed by interrupt will be
executed.becuase in C,we have
interruptf( SPR0I, function) which executes Process function every
time SPR0I occurs.In assembly I donot know about the equivalent code.

Again thanks for ur help
waiting for reply

Salrome