DSPRelated.com
Forums

ADSP-21364 talk-through code examples

Started by alex...@scopein.ch August 15, 2006
Hello!

Have you already tried the talk-through code examples provided by VisualDSP++ 4.0 for the ADSP-21364 EZKIT-Lite (...\Analog Devices\VisualDSP 4.0\213xx\EZ-KITs\ADSP-21364\Examples\ASM\Talkthru...)?

By adding a simple loop in the main audio routine, the program bugs for a counter larger than 3500. This means that for a 48kHz application, the maximum delay is about 73ms !!!

For instance the code for the "Talkthru Analog In-Out" example:
_talkThroughISR:
r10=dm(RXSP0A); // read new left sample from ADC
lcntr = 3500, do LP until lce; //simple loop
LP : nop;
dm(TXSP1A)=r10; // write to DAC1
dm(TXSP1B)=r10; // write to DAC2
dm(TXSP2A)=r10; // write to DAC3
dm(TXSP2B)=r10; // write to DAC4
rti;
_talkThroughISR.end:

Have you the same problem? And if yes, do you see a manner to solve it?

Thank you.

Alexis F.
--- In a..., alexis.favrot@... wrote:
>
> Hello!
>
> Have you already tried the talk-through code examples provided by
> VisualDSP++ 4.0 for the ADSP-21364 EZKIT-Lite?
>
> By adding a simple loop in the main audio routine, the program bugs
> for a counter larger than 3500. This means that for a 48kHz
> application, the maximum delay is about 73ms !!!
>
> For instance the code for the "Talkthru Analog In-Out" example:
> _talkThroughISR:
> r10=dm(RXSP0A); // read new left sample from ADC
> lcntr = 3500, do LP until lce; //simple loop
> LP : nop;
> dm(TXSP1A)=r10; // write to DAC1
> dm(TXSP1B)=r10; // write to DAC2
> dm(TXSP2A)=r10; // write to DAC3
> dm(TXSP2B)=r10; // write to DAC4
> rti;
> _talkThroughISR.end:
>
> Have you the same problem? And if yes, do you see a manner to solve
> it?
>
> Thank you.
>
> Alexis F.

Hello Alexis,

that behaviour is to be expected. The 21364 is a 333MHz processor,
which means that you have about 7000 instructions per sample period
at 48kHz. The interrupt routine gets called twice during each period,
once for left and once for right channel, which results in your
observed 3500 instructions per channel at 48khz.

To make a delay (of arbitrary size only limited by the amount of
available RAM), you only need two instructions and a circular buffer.
That leaves about 3498 instructions for further processing (per
channel).

Best regards,
Andor Bariska