资源简介
对于初学者来说是不错的样例程序,
并有完整的5000系列dsp系统初始化的相关程序
是C与汇编混合编程的良好样例

代码片段和文件信息
/*****************************************************************************/
/* */
/* FILENAME : bargraph.c */
/* */
/* DEscriptION */
/* TMS320C5416 DSK. */
/* Configures four user LEDs as a bargraph display. */
/* Different formats of display for mono audio stereo audio or power */
/* for use with Fast Fourier Transform (FFT). */
/* */
/*****************************************************************************/
ioport unsigned port0;
/*****************************************************************************/
/* Reference thresholds */
/*---------------------------------------------------------------------------*/
/* */
/* 0 dB reference is taken to be 50% output level. This allows 6dB headroom */
/* Other thresholds are -6dB -12dB and -18dB below the reference of 0dB. */
/* */
/*****************************************************************************/
#define LEVEL_0dB 0x4000
#define LEVEL_3dB 0x2D3F
#define LEVEL_6dB 0x2000
#define LEVEL_9dB 0x169F
#define LEVEL_12dB 0x1000
#define LEVEL_18dB 0x0800
#define LEVEL_24dB 0x0400
#define LEVEL_36dB 0x0100
/*****************************************************************************/
/* bargraph_3dB() */
/*---------------------------------------------------------------------------*/
/* */
/* Displays greater of two inputs as a bargraph using 3dB increments. */
/* For mono use use the single mono input for both the left and the right */
/* channels. */
/* */
/*****************************************************************************/
void bargraph_3dB(int left_channel int right_channel)
{
unsigned int input;
unsigned int value = 0;
/* If input value is negative then convert to positive */
/* Special case where input = -32768 Saturate 0x8000 to +32767. */
if ( 0x8000 == left_channel) left_channel= 0x7FFF;
else if (left_channel < 0) left_channel = - left_channel;
if ( 0x8000 == right_channel) right_channel= 0x7FFF;
else if (right_channel < 0) right_channel = - right_channel;
/* Di
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6483 2005-11-13 20:16 template1\bargraph.c
文件 1206 2005-11-11 17:14 template1\bargraph.h
文件 1051 2009-07-11 11:29 template1\cc_build_Debug.log
文件 4878 2009-07-11 11:29 template1\Debug\bargraph.obj
文件 6331 2009-07-11 11:29 template1\Debug\dskboard.obj
文件 8561 2009-07-08 17:17 template1\Debug\EmulatorResetTemp.wks
文件 31 2009-07-08 17:17 template1\Debug\SdTempBoardFile.dat
文件 4463 2009-07-11 11:29 template1\Debug\switches.obj
文件 5378 2009-07-11 11:29 template1\Debug\template1.obj
文件 55109 2009-07-11 11:29 template1\Debug\template1.out
文件 2810 2009-07-11 11:29 template1\Debug\vectors.obj
文件 690 2009-07-11 11:29 template1\Debug.lkf
文件 492 2009-07-09 11:03 template1\Debug.lkv
文件 2151 2009-07-11 10:53 template1\dskboard.c
文件 1476 2005-11-15 16:42 template1\dskboard.h
文件 2769 2009-07-08 17:01 template1\switches.c
文件 1019 2005-11-08 11:40 template1\switches.h
文件 3073 2009-07-11 11:29 template1\template1.c
文件 278 2005-11-15 16:20 template1\template1.cmd
文件 3072 2009-07-11 11:29 template1\template1.CS_\FILE.CDX
文件 466 2009-07-11 11:29 template1\template1.CS_\FILE.DBF
文件 801 2009-07-11 11:29 template1\template1.CS_\FILE.FPT
文件 28160 2009-07-11 11:29 template1\template1.CS_\SYMBOL.CDX
文件 12208 2009-07-11 11:29 template1\template1.CS_\SYMBOL.DBF
文件 18041 2009-07-11 11:29 template1\template1.CS_\SYMBOL.FPT
文件 2794 2009-07-09 11:42 template1\template1.paf
文件 2977 2009-07-11 11:30 template1\template1.paf2
文件 1029 2009-07-10 18:23 template1\template1.pjt
文件 2385 2009-07-11 11:30 template1\template1.sbl
文件 2424 2005-11-16 15:46 template1\vectors.asm
............此处省略6个文件信息
相关资源
- 操作系统c语言模拟文件管理系统844
- C语言开发实战宝典
- C++中头文件与源文件的作用详解
- C语言代码高亮html输出工具
- 猜数字游戏 c语言代码
- C语言课程设计
- 数字电位器C语言程序
- CCS FFT c语言算法
- 使用C语言编写的病房管理系统
- 通信过程中的RS编译码程序(c语言)
- 计算机二级C语言上机填空,改错,编
- 用回溯法解决八皇后问题C语言实现
- 简易教务管理系统c语言开发文档
- 操作系统课设 读写者问题 c语言实现
- 小波变换算法 c语言版
- C流程图生成器,用C语言代码 生成C语
- 3des加密算法C语言实现
- 简单的C语言点对点聊天程序
- 单片机c语言源程序(51定时器 八个按
- 个人日常财务管理系统(C语言)
- c语言电子商务系统
- 小甲鱼C语言课件 源代码
- 将图片转换为C语言数组的程序
- C语言实现的一个内存泄漏检测程序
- DES加密算法C语言实现
- LINUX下命令行界面的C语言细胞游戏
- 用单片机控制蜂鸣器播放旋律程序(
- 学校超市选址问题(数据结构C语言版
- 电子时钟 有C语言程序,PROTEUS仿真图
- 尚观培训linux许巍老师关于c语言的课
评论
共有 条评论