您好,欢迎访问三七文档
当前位置:首页 > 办公文档 > 工作计划 > keil_μVision4使用详解教程
KeilVision4zxmh61CPUMCS-51A51KeilMCS-51KeilKeilCuVisionKeilPentiumCPU16MBRAM20MWIN98NTWIN2000WINXP51CKeilCKeil1AT89C51MCS-514KFLASHROM,AT89C51P18P3.2~P3.44P12..........................................................................1Keil........................................................3Keil..............................7Keil........................................................7..........................................................12........................................13........................................................18..............................................23Keil....................................25..........................................................25..............................................................27...............................................................27..............................................................29Keil.....................................................30..................................................30............................................32Keil.........................................36..............................................................36......................................................393KeilEdit-Configuration...1.1.11.1.11.1.2Editor()Colors&Fonts()UserKeywords()Shortcutkeys(4)Templates()Other()Colors&Fonts()1.1.2Colors&Fonts1.1.251.1.2Window8051:EditorAsmFeiles80518051:EditorCFeiles8051CElementCourierNew14Window8051:EditorAsmFeilesElementTextFontFont1.1.31.1.4FontCourierNewSize14OKCourierNew141.1.361.1.4Window8051:EditorAsmFeilesElementKeywordFontFontColorsForeground1.1.51.1.5OKView-FullScreen1.1.6,71.1.6KeilKeilKeiluVision4Keil4ProjectBooksFunctionsTemplatesCPUCPUKeil2.1.182.1.1keiluVision41CPUKeilCPUCPUKeilProjectProject-NewVisionProject,2.1.292.1.22.1.3exam12.1.42.1.3102.1.41-42.1.5CPUKeilCPUAtmel89C51ATMEL+AT89C512.1.6OKMCU2.1.5MCU112.1.6AT89C51MCUC2.1.72.1.7Target1++SourceGroup112File-New2-12-22-12-2Feil-Save13Feil-SaveAs...N.asm.c.asm.cCasm2-32-3SourceGroup1AddfiletoGroupSourceGroup13-1143-13-2Csourcefile(*.c)C3-2asmexam1.asmAsmSourceFile(*.a51,*.asm)3-3exam1.asm3-4153-33-4exam1.asm4-54-516CloseSourceGroup1exam1.asmexam1.asm3-63-6Keil2-4MOVA#0FEHMAIN:MOVP1ARLALCALLDELAYAJMPMAINDELAY:MOVR7,#255D1:MOVR6,#255DJNZR6,$DJNZR7,D117RETEND3-73-83-818ProjectTarget1Project-Optionfortargettarget14-1Alt+F74-184-24-2TargetTarget4-2XtalCPUAT89C5124M1912.04-34-3MemoryModeRAMSmall:variablesinDATARAMCompact:variablesinPDATARAMLarget:variablesinXDATARAM4-4Small:variablesinDATA4-4MemoryModeCodeRomSize:ROMSmall:program2k20orless2KCompact:2kfunctions,64kprogram2K64KLarget:64kprogram64K4-5Larget:64kprogram4-5CodeRomSizeOperatingsystem:KeilRTX-51TinyRTR-51FullNone4-64-6Operatingsystem21Useon-chipROMROMOff-ChipCodememoryROMOff-ChipXdatamemoryRAM4-74-7TargetOutPut4-8CreatHexfileHEX.HEXDebugInformationBrowseInformationview-BrowseSelectFolderforObjectsNameofExecutable:224-8OutPutC51A51BL51Listing4-9*.lst*.m51CCompileListingAssambleCodeC4-8Listing23C51KeilC51CodeOptimization4-9LevelC5198Emphasis4-9C51OKProject-BuildtargetRebuildAlltargetfilesTranslate,.5-1245-15-25-2Build5-3exam1.hexKeil5-3hex25KeilCtrl+F5Debug-Start/StopDebugSession2.1.1KeilCPUCPU2.1.1Debug2.1.2Debug2612.1.2STEPF11STEPOVERF10F112.1.3F11LCALLDELAYF11DELAYF112.1.327D2DJNZR6,D2F1retDebug-RuntoCursorlineDebug-StepOutofCurrentFunctionJMPLOOPF10F11lcalldelayF10JMPLOOPKeilKeilDebug-InlineAssambly,3.2.1EnterNew3.2.128/Debug-Insert/RemoveBreakPointDebug-Enable/DisableBreakpointDebug-DisableAllBreakpointDebug-KillAllBreakPointKeilDebug-Breakpoints,3.3.13.3.13.3.1ExpressionKeil1Experssiona==0xf7Defineaa0xf7,=,,=,!=,&,&&2ExperssionDelayDefineDelay3ExperssionDelayCount3Delay294ExperssionDelayCommandprintf(SubRoutineDelayhasbeenn)DelayCommandSubRoutineDelayhasbeenCalled\n5CommandDEFINEintI4Commandprintf(SubRoutineDelayhasbeenCalledn,++I)DelayCommandSubRoutineDelayhasbeenCalled10timesCDJNZR6,$$D1F10LCALLDELAYHaltHaltRSTF10LCALLDELAYF11F11DJNZR6,D1R6FFHFEHR60DJNZR6,D1DJNZR7,0EH0EH330KeilKeilKeilOutputWindowsWatch&CallStatckWindowsMemoryWindowDissamblyWindowSerialWindowView4.1.1Command4.1.1AddressCDIXRAMD00RAMC00ROMAsciiFloatDouble84.1.2314.1.2DecimalUnsignedSignedCharIntLongUnsignedSignedI:000H01HI101H02HCCModifyMemoryatX:xx4.1.34.1.34.1.4ABDPTRSPPSWPCStatusF2324.1.4ABDPTRView-PeriodicWindowUpdata2#includereg51.hsbitP1_0=P1^0;//P1.0voidmDelay(unsignedcharDelayTime){unsignedintj=0;for(;DelayTime0;DelayTime--)for(j=0;j125;j++);}voidmain(){unsignedinti;for(;;){33mDelay(10);//10i++;if(i==10){P1_0=!P1_0;i=0;}}}10I1II10P1.0I0P1.00.1Sexam2.cexam2exam2.cCtrl+F5F10LocalsImDelay(10)F11mDelayDelayTimejWatch#1Watch#2typeF2toeditF2Watch#1II1010P1_0=!P1_0IF2I9F10P1_0=!P1_04.2.14.2.1View-DissamblyWindow344.2.2MixedModeAssemblyMode4.2.2Keil6-10RegsSysSecRSTSecF10mDelay(10)Sec0.00038900F10Sec0.010512000.01unsignedintunsignedchar35KeilCPUCPUKeilRI1SBUFser_init3MOVSP,#5FH;CALLSER_INIT;LOOP:JBCRI,NEXT;JMPLOOP;NEXT:MOVA,SBUF;SBUFMOVSBUF,A;SBUFSEND:JBCTI,LOOP;LO
本文标题:keil_μVision4使用详解教程
链接地址:https://www.777doc.com/doc-4893345 .html