版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
旅游信息学院2017—2018学年度第2学期《无线传感网络技术及应用》试卷试题(考查时间90分钟)一IAR环境配置IAREmbeddedWorkbenchEvaluationfor80518.10.3eiARSYSTEMSLicenseeiARSYSTEMSPleasereadthefollowinglicenseagreementcarefully.SOFTWARELICENSEAGF1EEMENT(concerningProducts:I.AREmbeddedWurkbench?visualST.^.TE?andLAF;Povs'erPac?fromIARSystemsABPREAMBLETHISSOFTWARELICENSEAGREEMENT[THE,,AGFIEEMENT"|APPLIESTOPRODUCTSLICENSEDBYIAF1SYSTEMSABINCLUDINGANYOFITSSUBSIDIARIES「'IARSYSTEMS"!UFIDISTF1IBUTORS("IARDISTRIBUTORS'!TOYULI|"THELICENSEE11!.Print通IacceptthetermsofthelicenseagreementPrintIdonotacceptthetermsofthelicenseagreementInstallShieldCancelWelcometotheInstallshieldWizardforIAREmbeddedWorkbenchEvaluationfor8051TheInstallShieldWizardwillinstallIAREmbedded'w'orkbenchEvaluationfor8051onyourcomputer.Tocontinue,clickNext.®IARSYSTEMS<BackNext>CancelEnterUserInformationIAREmbeddedWorkbenchEvaluationfor80518.10.3®IARSYSFEMSEnteryourname,thenameofyourcompanyandyourIAREmbeddedWorkbenchEvaluationfor8051licensenumber.EnterUserInformationName:aCompany:MicrosoftCanbefoundontheCDcoverorviae-mailregistrationLicensett:1539-057-666-4566n$tallShield<BackNext<BackNext>CancelEnterLicenseKeyIAREmbeddedWorkbenchEvaluationfor80518.10.3®IARSYSTEMSEnterLicenseKeyThelicensekeycanbeeitheryourQuickStartkeyoryourpermanentkey.IfyouentertheQuickStartkey(foundontheCDcover),youhave30daystotrytheproductout.IfyouhavereceivedthepermanentkeyviaemailyoupasteitintotheLicenseKeytextbox.Licensett:1539-057-666-4566LicenseKey:|30H18HAZZHNIAWHC07ATHBMS7SRZN9563WAWI011YGEJDYNPT9ZG877GZNOFSZHILLMMVJFLS><25HFENTL9VC6L80PZ0VT6C10LKB1ZIAVHZU3BM0UFF4XF00ZM2EURWDVCB2YEDYJAIPG2NKOUQQGPAQN4CPEQKRT0JCMEOLXBCT3EKDVRCKJWRBU1C0YMttReadLicenseKeyFromFileC:Browse...<BackNext>CancelIAREmbeddedWorkbenchEvaluationfor80518.10.3•IARSYSTEMSSelectProgram•IARSYSTEMSPleaseselectaprogramfolder.SetupwilladdprogramiconstotheProgramFolderlistedbelow.Youmaytypeanewfoldername,orselectonefromtheexistingfolderslist.ClickNexttocontinue.ProgramFolder:,REmbeddedWorkbenchfor80518.10EvaluateExistingFolders:IAccessoriesBAdministrativeToolsAdobe□EnterpriseArchitect11GamesIARSystemsJavaJavaDevelopmentKitMaintenanceU▼InstallShield<BackNext>CancelIAREmbeddedWorkbenchEvaluationfor80518.10.3InstallshieldWizardCompleteTheInstallShieldWizardhassuccessfullymilledIAREmbeddedWskbenchEvaluationfor9051.ClickFinishtoexitthewizard[7]Viewlhereleasenotes[7]LaunchIAREmbeddedWorkbench®IARSYSTEMS<BackFinishCancelFileEditFileEditView[Project]TookWindowHelpI*WO!ifAddKi«-AddOroup..:ImportFilelist—F盹5CreateNewProject...AddExistingProject...TOC\o"1-5"\h\zOptions…At+F7ISourceCodeControl►IIMakeHICompueCtri*F7IRebuildAMCleanBatchbuild...F8IStopBuildCtd*BreaVIDownloadsMDebugCtrl*DI腿bugwithoutDownloadingMake&RestartDebuggerCtrURIDebuggerCtrJShiftiRIDownload►ICreate4newproiectandinsertitintotheworkspace1M720W4/4JS字FileEditViewProjectFooliWindowHelpFitesReadySS字RleEditViewPrqEfootsWicdoaHelpD芽0TtHtfl,iKKSMTfcK真直,一安访问的位查J!M-»乐£«y图Ka-.38』•JaDD卜b24i、HIAREW8051V8.15<*S(N):test®«S«T):|PruettS(\ewp)■WRk伴大2W故字坷2018/4/4HieEditViewProjectSimulatorToolsWindowHelp*|unwie<H!OobMJ▼「USD-:zlhtr赫将||博”以k骤呻岫-.fileEditViewProjectSimulatorToolsWindowHelpw0睡□"一U'UGZ^XAdEinistrMor'DsktopXHHtZigBee^?发关境\test.c穹Lf推|况AddFiles-testUeW,华建石gBee开豉境>「畋,快拦▼*/USOB^修改日18燮21大小•Tft上settings2018/4/413:52文件关■真鹿3:2018/4/413:52C踏1KB|.-.安访问的卤Eia8相卜图片EJZBJH5.;■nun,文件名(N):teste▼;SourceFiles(B.q\cpp/.cc,-i,▼E。)IMI取J■⑦'"心咿〃n,■⑦'«t@)ta岫/4生IAREmbeddedWtxkberxhIDED1|-0□testeMbZjOutputUnbtfedl[_"国,-本IBg(D:)文住(N):CC253OF256J51nieEditViewProjectSimulatorTookWindowHelpDSH畋.罗建文传天:~计鼻ei.本%sfi(coReady«8051>config>devices>TexasInstruments■«EMfc^sr可mai:CC2530F128J51修改日期4UA1/37"AV^r2011/9/2710:29i5ixn大小X21KB一CC2530F256J512011/9/271029J51奶....CC2531F128J512011/9/2710:29g丈件1KB:CC2531F2565S12011/9/2710:29151文件1KB»CC2533F32J512011/9/2710:29闵文件1KB―CC2533F64J512011/9/2710:29151文件1KBjCC2533F9&512011/9/2710:29151文件1KB—CC2540F128J512011/9/2710:29151奶1KB—CC2540F256J512011/9/2710^9风文件1KB一CC2S41F256JS12011/9/271029皿龄1KB,MSC1200V2JS12011/9/2710:53151X4*1KB,MSC1200Y3.i512011/9/7710:53龙1文件1KBidevicedescriptionfieC.i51)▼5。)ITi3/谆艇面口*IMbZdOutputUnbred1Optionsfornode"test"CategoryC/C++CompterAssenWerQfftomBuWBuMAcbonsUioerDebuggerThrd-PartyDoverTexasInstrunenfeFS2System5qInfineonNor<kSeftKOcxkxROM-MonitorAnatooDevicesSiabsS<nddtorPoiftltrCod«BtfJcOutputLibraryCgfiD«vic«iafornUionDevice0025307256Q。CallincconventionXDATAtt^dcre«tklr*ntOK]I,Cwel|阮,二WorkbenchIDEe…e蓊;4WorkbenchIDEe…e蓊;4File£d代ViewPrqESirnulatorTool,WindowHelpDW0,。巽出2,Ready13:56
2018/4/4LED自动闪烁#include<ioCC2530.h>#defineLED1P0_0#defineLED2P2_0voiddelay(unsignedinti)(unsignedintj,k;for(k=0;k<i;k++){for(j=0;j<500;j++);}}voidmain(void)(P0DIR|=0x01;P2DIR|=0x01;while(1)(P0_0=0;P2_0=0;delay(100);P0_0=1;P2_0=1;delay(100);}}定时器T1实验#include<ioCC2530.h>#defineLED1P2_0#definecounterP0_0voiddelay(unsignedinti)(unsignedintj,k;for(k=0;k<i;k++)(for(j=0;j<500;j++);}}#pragmavector=T1_VECTOR__interruptvoidTimer1(void)(if(counter<4)counter++;else(counter=0;P0_0=~P0_0;}}voidmain(void)(P0DIR|=0x01;P2DIR|=0x01;P0_0=1;P2_0=1;counter=0;CLKCONCMD&=~0x40;while(!(SLEEPSTA&0x40));CLKCONCMD=0xb8;SLEEPCMD|=0x04;T1CC0L=0xD4;T1CC0H=0x30;T1CTL=0x33;EA=1;T1IE=1;while(1)(P2_0=~P2_0;delay(100);}}AD转换#include<ioCC2530.h>chardata□=〃ADC不同配置的测试!\n〃;unsignedintvalue;unsignedintadcvalue;voiddelay(unsignedinti)(unsignedintj,k;for(k=0;k<i;k++)(for(j=0;j<500;j++);}}voidinitial_AD()(APCFG|=0x01;P0SEL|=(1<<(0));P0DIR|=~(1<<(0));ADCCON3=0xB0;}voidinitial_usart()(CLKCONCMD&=~0X7F;while(CLKCONSTA&0X40);CLKCONCMD&=~0X47;PERCFG=0X00;P0SEL|=0X3C;P2DIR&=~0xC0;U0CSR|=9;U0BAUD=59;}voiduart_tx_string(char*data_tx,intlen)(unsignedintj;for(j=0;j<len;j++)(U0DBUF=*data_tx++;while(UTX0IF==0);UTX0IF=0;}}voidmain(void)(initial_usart();initial_AD();uart_tx_string(data,sizeof(data));while(1)(while(!(ADCCON1&0X80));adcvalue=(unsignedint)ADCL;adcvalue|=(unsignedint)(ADCH<<8);value=adcvalue>>2;data[0]=value/10000+0x30;data[1]=(value%10000)/1000+0x30;data[2]=((value%10000)%1000)/100+0x30;data[3]=(((value%10000)%1000)%100)/10+0x30;data[4]=value%10+0x30;data[5]='\n';delay(5000);uart_tx_string(data,6);ADCCON3=0xB0;}}4.数码管#include<ioCC2530.h>voiddelay(unsignedinti)(unsignedintj,k;for(k=0;k<i;k++)(for(j=0;j<500;j++);}}unsignedcharseg7table[16]=(0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};voidSegInit()(P1INP&=~(0x1<<2);P1SEL&=~((1<<0)|(1<<1)|(1<<2));P1DIR|=(1<<0)|(1<<1)|(1<<2);P0SEL&=~(1<<4);P0DIR|=(1<<4);P1|=(0x1<<0);P1|=(0x1<<1);P1|=(0x1<<2);P0|=(0x1<<4);}//*************************voidSendSeg7(unsignedcharvalue)(unsignedchari;P0&=~(0x1<<4);P1&=~(0x1<<2);P1&=~(0x1<<1);for(i=0;i<8;i++)(if(value&0x80)(P1|=(0x1<<1);}else(P1&=~(0x1<<1);}value<<=1;P1&=~(0x1<<2);P1|=(0x1<<2);}P0&=~(0x1<<4);P0|=(0x1<<4);}//************************voidmain(void)(SegInit();while(1)(for(inti=0;i<0x10;i++)(SendSeg7(seg7table[i]);delay(400);}SendSeg7(0xff);delay(400);uint32ReadSHT1(uint8Addr)(uint32IResult;while(1)(SHT1_Start();SHT1_WriteCo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024-2025学年高中物理 第一章 碰撞与动量守恒 本章专题整合提升教案 教科版选修3-5
- 《争做守法好少年:2 拒绝赌博诱惑》教学设计-2023-2024学年六年级下册综合实践活动沪科黔科版
- 人教版八年级上册 第二节 细菌 教案
- 四年级信息技术下册 第三单元 第15课《我的集邮册》教学设计 冀教版
- 13《桥》(教学设计)2024-2025学年统编版语文六年级上册
- 技能提升与竞技优势
- Unit 1 Lesson3 Making Breakfast(教学设计)-2024-2025学年冀教版(三起)英语六年级上册
- Unit 2 What time is it A Lets learn A Lets do(教学设计)-2023-2024学年人教PEP版英语四年级下册
- 安徽省长丰县高中数学 第三章 导数及其应用 3.2 导数的计算 3.2.1 几个常用函数的导数教案 新人教A版选修1-1
- Unit 4 Numbers Lesson 1(教学设计)-2024-2025学年人教新起点版英语一年级上册
- 室内装饰装修材料木家具中有害物质限量GB18584-2001
- 人教版小学数学“数与代数”教材梳理
- 高校教师教师课堂教学基本行为规范
- 石化公司入厂安全教育考试题试题A
- KA管理谈判的技巧
- 石油化工码头和库区安全设施配备参考目录及技术要求
- 俯斜式路肩挡土墙施工方案
- 跨越架专项施工方案
- 镇江市劳动合同书
- 《百合花》PPT教学课件-人教版高中语文必修一
- 【方案】市政工程顶管施工路面沉降监测及防治方案及措施
评论
0/150
提交评论