Analog Devices adsp-2100 Manual page 178

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

Advertisement

8 Analog Interface
Before autobuffering is enabled, separate circular buffers must be set
up in data memory for the ADC receive and DAC transmit data. This
is accomplished by selecting I (index) and M (modify) registers in the
analog autobuffer/powerdown register; see Figure 8.5.
Transmit data autobuffered to the DAC is addressed with the I register
specified in the ATIREG field (bits 9, 10, 11). Receive data autobuffered
from the ADC is addressed with the I register specified in the ARIREG
field (bits 4, 5, 6). The modify (M) registers are specified in the
ARMREG (bits 2, 3) field and ATMREG (bits 7, 8) field. Since the
transfer of ADC and DAC data occurs simultaneously, it is possible to
use the same I register for transmit and receive autobuffering. In this
case, the buffer is shared for both functions and care should be taken
when specifiying a value for the M register.
An autobuffering example program is shown in Listing 8.2.
{ ADSP-21msp58/59 Analog Interface Autobuffer Example }
{
- configures analog interface
{
- enables analog autobuffer
{
- receive analog data into a 256 word buffer
{
- transmit analog data from a 256 word buffer
.MODULE/RAM/ABS=0/BOOT=0
.VAR/DM/CIRC
.VAR/DM/CIRC
.VAR/DM
flag_bit;
#define
codec_tx_data
#define
codec_rx_data
#define
codec_ctrl_reg 0x3FEE
#define codec_auto_ctrl 0x3FEF
resetv:
irq2v:
hipwv:
hiprv:
spt0tv:
spt0rv:
antv:
anrv:
irq1v:
irq0v:
timerv:
pwrdwnv:
8 – 14
auto_example;
buff1[256];
buff2[256];
0x3FEC
0x3FED
JUMP setup; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
JUMP switch; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
RTI; NOP; NOP; NOP;
}
}
}
}
{first data buffer}
{second data buffer}
{tracks buffers}
{interrupt vectors ...}
{call autobuffer switch}

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents