CCS60Graphdisplayset显示波形设置实例详解Word文件下载.docx
- 文档编号:22768115
- 上传时间:2023-02-05
- 格式:DOCX
- 页数:9
- 大小:181.06KB
CCS60Graphdisplayset显示波形设置实例详解Word文件下载.docx
《CCS60Graphdisplayset显示波形设置实例详解Word文件下载.docx》由会员分享,可在线阅读,更多相关《CCS60Graphdisplayset显示波形设置实例详解Word文件下载.docx(9页珍藏版)》请在冰豆网上搜索。
csedu.h"
scancode.h"
voidInitADC();
voidwait(unsignedintcycles);
voidEnableAPLL();
unsignedintnADC0[256],nADC1[256];
main()
{
inti;
unsignedintuWork;
EnableAPLL();
SDRAM_init();
InitADC();
PLL_Init(132);
while
(1)
for(i=0;
i<
256;
i++)
ADCCTL=0x8000;
//启动AD转换,通道0
do
uWork=ADCDATA;
}while(uWork&
0x8000);
nADC0=uWork&
0x0fff;
}
ADCCTL=0x9000;
//启动AD转换,通道1
nADC1=uWork&
asm("
nop"
);
//breakpoint
voidInitADC()
ADCCLKCTL=0x23;
//4MHzADCLK
ADCCLKDIV=0x4f00;
voidwait(unsignedintcycles)
inti;
for(i=0;
i<
cycles;
i++){}
voidEnableAPLL()
{
*(ioportvolatileunsignedshort*)0x1f00=4;
wait(25);
*(ioportvolatileunsignedshort*)0x1f00=0;
//MULITPLY
*(ioportvolatileunsignedshort*)0x1f00=0x3000;
//COUNT
*(ioportvolatileunsignedshort*)0x1f00|=0x4F8;
//*(ioportvolatileunsignedshort*)0x1f00|=0x800
//MODE
*(ioportvolatileunsignedshort*)0x1f00|=2;
wait(30000);
//APLLSelect
*(ioportvolatileunsignedshort*)0x1e80=1;
//DELAY
wait(60000);
2、点击菜单project->
buildall,编译,如图,没错误。
3、选中工程,点击“DEBUG"
按钮,如图:
4、让光标停在:
//breakpointz这一行,
点击菜单RUN->
Togglebreakpoint,设断点,如图:
5、按F8键,程序运行到断点处,如图:
6、选择菜单TOOL->
GRAPH->
SINGLETIME,弹出如图窗口:
7、将上述窗口参数配置成如图所示:
8、点击OK按钮,显示波形界面如下图:
9、选中断点,右键单击,选中breakpointproperties,如图:
10、把ACTION一栏,RemainHalted改为Refreshallwindows,如图:
11、点击OK按钮。
点击运行按钮(绿色小箭头),运行程序。
可以看到波形连续刷新显示,本次实验结束。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- CCS60Graphdisplayset 显示 波形 设置 实例 详解