Analog Devices adsp-2100 Manual page 179

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

setup:
I0 = ^buff1;
L0 = %buff1;
I1 = ^buff2;
L1 = %buff2;
M0 = 0x1;
SI = 0x0;
DM(flag_bit) = SI;
AY0 = 0x0203;
DM(codec_auto_ctrl) = AY0;
AX1 = 0x0060;
DM(codec_ctrl_reg) = AX1;
IMASK = 0x8;
wait:
IDLE;
JUMP wait;
switch:
AX0 = DM(flag_bit);
AR = pass AX0;
IF NE JUMP fill_buff2;
fill_buff1:
SI = 0x1;
AY0 = 0x0013;
JUMP done;
fill_buff2:
SI = 0x0;
AY0 = 0x0203;
JUMP done;
done:
DM(codec_auto_ctrl) = AY0;
DM(flag_bit) = SI;
RTI;
.ENDMOD;
Listing 8.2 ADSP-21msp58/59 Analog Autobuffer Program
Receive and transmit autobuffering may be independently enabled
and the two interrupts can occur (and be serviced) independently. This
allows the use of different data buffer lengths when autobuffering both
receive and transmit data. It also allows autobuffering to be used on
only one side, receive or transmit, while the other is serviced at the
8 kHz interrupt rate.
Analog Interface
{I0 points to first data buffer}
{I1 points to second data buffer}
{initialize flag register}
{use I1 and M0 for tranmsit}
{use I0 and M0 for receive}
{enable rcv and tx autobuffer}
{power up analog interface}
{enable analog rx interrupt}
{wait for autobuffer interrupt}
{check buffer status}
{fill buff2 next time}
{fill buff1 next time}
8
8 – 15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents