CCS60Graphdisplayset显示波形设置实例详解

上传人:s9****2 文档编号:512378587 上传时间:2023-03-26 格式:DOCX 页数:11 大小:372.30KB
返回 下载 相关 举报
CCS60Graphdisplayset显示波形设置实例详解_第1页
第1页 / 共11页
CCS60Graphdisplayset显示波形设置实例详解_第2页
第2页 / 共11页
CCS60Graphdisplayset显示波形设置实例详解_第3页
第3页 / 共11页
CCS60Graphdisplayset显示波形设置实例详解_第4页
第4页 / 共11页
CCS60Graphdisplayset显示波形设置实例详解_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《CCS60Graphdisplayset显示波形设置实例详解》由会员分享,可在线阅读,更多相关《CCS60Graphdisplayset显示波形设置实例详解(11页珍藏版)》请在金锄头文库上搜索。

1、CCS6.0显示AD波形利用CCS6.0实时显示两路AD转换结果,用波形的显示的设置步骤如下:asmIB芻* CCS Edit - AD/main.c - Code Composer Studio:ile Edit View Navigate Project Run Scripts Window Help1、打开CCS6.0,打开AD工程,如图:国main.匚”逖上I Project Explorer 3超 rts55xib3 #include scanccde uh45 void InitAD匚()j6 void wait( unsigned int 匸y匚les );7void Enabl

2、eAPLL( )j89 unsigned int nADC256,nADCl256j 1&11 main()12 13 int i;14 unsigned int uWorkj1515 EnableAPLLO;16 SDFW1_init()j17 InitADCf);18 PLLnitflBZ);4344 void InitADCf)J旦 Con sole 空No consoles to display at this time.uWork=ADC DATA; while ( uWork&BxS& ); nADC li =uWork&.0x0rf 幵;/ break point止色負D Act

3、ive - Debug! b 锻F Binaries hj Includes b 国Debugr 已targetConfigsb 囲55O9.H 助adrCmdb 围c55O9.h:围 c55xxdefs.h b 剧csedu.h 国func.hb 园main.c【 围myapp.hl 剧peripherals.hp 国 scancode.h t x| sdram门验匸 cj util.c l 画 util.h昌 cslSSOSx.lib20while (1 )2122foi(i=0;i256;i-H-)2324ADCCTL=0xS0&0;/25do-2627ul!ork=ADC DATA;2

4、8 while ( uWark&-0xS&00 )j29nADCij=uWor3&31for(i=0;i256ji+-l-)3233ADCCTL=0k90Wj / .锻ADf弹.垂5134do程序如下:#include myapp.h#include csedu.h#include scancode.hvoid InitADC();void wait( unsigned int cycles );void EnableAPLL();unsigned int nADC0256,nADCl256;main()int i;unsigned int uWork;EnableAPLL();SDRAM_i

5、nit();InitADC();PLL_Init(132);while ( 1 )for ( i=0;iv256;i+ )ADCCTL=0x8000; / 启动 AD 转换,通道 0douWork=ADCDATA; while ( uWork&0x8000 );nADC0=uWork&0x0fff;for ( i=0;iv256;i+ )ADCCTL=0x9000; / 启动 AD 转换,通道 1douWork=ADCDATA; while ( uWork&0x8000 );nADC1=uWork&0x0fff;asm( nop); / break pointvoid InitADC()ADC

6、CLKCTL=0x23; / 4MHz ADCLKADCCLKDIV=0x4f00;void wait( unsigned int cycles )int i;for ( i = 0 ; i build all,编译,如图,没错误。3、选中工程,点击“DEBUG按钮,如图:二i Project Explorer S3j 也芳 AD Active - DebugBinaries Includes Debug5509.,had.cmdc5509.h匚 55xxdef5.hcsedu.hfunc.hmam.c myapp.h peripherals.h scancode.hsdramjnit 匚ut

7、il.cutil.hcsl5509x.librts55x.lib炼Debug舉 B |爲-巒更-处编”逍i龜匸 仁 AD f匚ode Composer Studio - Device Debugging j 靜 Texas Instruments XDS100v2 USB Emulator/C55xx (Suspended - SW Breakpoint)三 mainO at main.c:12 0x000463三 _arg5_mainO at 鮎gs_main.c:72 OxOOOBBD Cargs_main does not 匸ontin frame information);c main

8、.c 36 void wait( unsigned int cycles );7 void EnableAPLL();9 unsigned int nADCO256,nADCl256;10皴 14unsigned int utark;EnableAPLL();18InitABcf);fcrei);i;22for ( i=;i256;i+ )ADCCTL=0x8e&0-;/ 宕丸AD詳兰.逋道B貝 Console 3AD匸55xk: GEL Output: C5599A Init Complete.ADCCTL=0x8000;uWork=ADCDATA; while ( uWork&0x800

9、);nADC01J=uWo rk&0x0fff;uWork=ADCDATA; while ( ul-Jork&0x8000 );nADC11J=uWo rk&0x0fff;:2728hi323334旦 Console S3ADC55xx: GEL Output: C5509A Init Complete.;c main.casm(/ break point:uilork=ADCDATA; while ( utork&0x&0 ); nADC 1 i =ute r k&.0x0f 幵;p9二?433 void InitADC()45 uWork=ADCDATA;)while ( uWork&9x

10、80&9 ); nADCi=utor k&0x&fff;far ( i=0;iToggle breakpoint,设断点,如图:5、按F8键,程序运行到断点处,如图:6、选择菜单 TOOL-GRAPH-SINGLE TIME,弹出如图窗口:7、将上述窗参数配置成如图所示:PropertyValuej Data PropertiesAcquisition Buffer Size256Dsp Data Type16 bit unsigned integerIndex Increment1Q_Value0Sampling Rate Hz1Start AddressnADCl Display Prop

11、ertiesAxis Display0 trueData Plot StyleLineDisplay Data Size200Grid StyleNo GridMagnitude Display Sc.LinearTime Display UnitsampleUse De Value For Graf O falseImport ExportOK Cancel&点击OK按钮,显示波形界面如下图:9、选中断点,右键单击,选中breakpoint properties,如图:Breakpoint Properties二 Properties for匚 Breakpoint PropertiesPropertiesValues Hardware 匚onfigurationL LocationE:d spCCS5.4ADD eb u g/./m a i n. c, tine 40 Debugger ResponseCondition

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 学术论文 > 其它学术论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号