PAGE 1: SCRATCH: origin = 0060h, length = 0020h /* Scratch Pad Data RAM */
DMARAM: origin = 0C00h, length = 0300h /* DMA buffer */
DATA: origin = 1100h, length = 0080h /* Internal Data RAM */
STACK: origin = 1180h, length = 0560h /* Stack Memory Space */
INRAM: origin = 1900h, length = 0100h /* Internal Data RAM */
HPRAM0: origin = 1A00h, length = 0002h /* HPI memory accessible by Host and DSP */
HPRAM1: origin = 1A02h, length = 0280h /* HPI memory accessible by Host and DSP */
HPRAM2: origin = 1C82h, length = 0280h /* HPI memory accessible by Host and DSP */
EXRAM: origin = 1F10h, length = 9000h /* External Data RAM */
}
SECTIONS
{
.cinit > PRAM PAGE 0
.text > PRAM PAGE 0
.vectors > VECS PAGE 0
init_var > PRAM PAGE 0
detect > PRAM PAGE 0
vrcprg > PRAM PAGE 0
matprg > PRAM PAGE 0
.stack > STACK PAGE 1
.trap > SCRATCH PAGE 1
.const > EXRAM PAGE 1
.data > EXRAM PAGE 1
.bss > EXRAM PAGE 1
.cio > EXRAM PAGE 1
.switch > EXRAM PAGE 1
tables > EXRAM PAGE 1
var > EXRAM PAGE 1
svctab > EXRAM PAGE 1 /* SS_V LSP table */
vctab > EXRAM PAGE 1 /* V LSP table */
uvctab > EXRAM PAGE 1 /* UV LSP table */
cuvtab > EXRAM PAGE 1 /* Stochastic codebook */
cdbktab > EXRAM PAGE 1 /* various codebook tables*/
logtab > EXRAM PAGE 1 /* table for log2 */
powtab > EXRAM PAGE 1 /* table for pow2 */
hamtab > EXRAM PAGE 1 /* table for hamming */
lgwtab > EXRAM PAGE 1 /* table for lag window */
acostab > EXRAM PAGE 1 /* table for arccos */
sqrtab > EXRAM PAGE 1 /* table for square root */
acbtab > EXRAM PAGE 1 /* table for thresholds in acb */
pm03tab > EXRAM PAGE 1 /* table for x^(-0.3) computation */
costab > EXRAM PAGE 1 /* table for cosine */
V23 > INRAM PAGE 1
FSK > INRAM PAGE 1
hpibuff0 > HPRAM0 PAGE 1
hpibuff1 > HPRAM1 PAGE 1
hpibuff2 > HPRAM2 PAGE 1
dma_buff > DMARAM PAGE 1
}
/*主程序设计*/
/*语音采集及回放程序*/
/*用A律进行压缩及解压*/
/*采用AD50进行A/D,D/A转换 */
/*灯循环闪烁程序开始*/
/*L0:录音*/
/*L1:放音*/
#include <type.h> /* 头文件*/
#include <board.h>
#include <codec.h>
#include <mcbsp54.h>
/* 宏定义 */
#define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */
#define QUANT_MASK (0xf) /* Quantization field mask. */
#define NSEGS (8) /* Number of A-law segments. */
毕业论文http://www.751com.cn/ 论文网http://www.751com.cn/
void led(s16 cnt);
void initcodec(void);
void flashenable(void);
unsigned char data2alaw(s16 pcm_val);
int alaw2data(unsigned char a_val);
static int search(int val,short *table,int size);
/* 全局变量 */
HANDLE hHandset;
s16 data;
s16 data1;
u16 i=0;