单片机和keil毕业论文外文翻译Word格式.docx
《单片机和keil毕业论文外文翻译Word格式.docx》由会员分享,可在线阅读,更多相关《单片机和keil毕业论文外文翻译Word格式.docx(12页珍藏版)》请在冰豆网上搜索。
Alsoknownassingle-chipMCU(Microcontroller),becauseitwasfirstusedinthefieldofindustrialcontrol.Onlybythesingle-chipCPUchipdevelopedfromthededicatedprocessor.ThedesignconceptisthefirstbyalargenumberofperipheralsandCPUinasinglechip,thecomputersystemsothatsmaller,moreeasilyintegratedintothecomplexanddemandingonthevolumecontroldevices.INTELtheZ80isoneofthefirstdesigninaccordancewiththeideaoftheprocessor,Fromthenon,theMCUandthedevelopmentofadedicatedprocessorpartedways.
Earlysingle-chip8-bitorallofthefour.OneofthemostsuccessfulisINTEL'
s8031,becausetheperformanceofasimpleandreliableaccesstoalotofgoodpraise.Sincethenin8031todevelopasingle-chipmicrocomputersystemMCS51series.Basedonsingle-chipmicrocomputersystemofthesystemisstillwidelyuseduntilnow.Asthefieldofindustrialcontrolrequirementsincreaseinthebeginningofa16-bitsingle-chip,butnotidealbecausethepricehasnotbeenverywidelyused.Afterthe90'
swiththebigconsumerelectronicsproductdevelopment,single-chiptechnologyisahugeimprovement.INTELi960SerieswithsubsequentARMinparticular,abroadrangeofapplications,quicklyreplacedby32-bitsingle-chip16-bitsingle-chiphigh-endstatus,andenterthemainstreammarket.Traditional8-bitsingle-chipperformancehasbeentherapidincreaseinprocessingpowercomparedtothe80'
storaiseafewhundredtimes.Atpresent,thehigh-end32-bitsingle-chipfrequencyover300MHz,theperformanceofthemid-90'
scloseontheheelsofaspecialprocessor,whiletheordinarypriceofthemodeldroppedtooneU.S.dollars,themosthigh-endmodels,only10U.S.dollars.Contemporarysingle-chipmicrocomputersystemisnolongeronlythebare-metalenvironmentinthedevelopmentanduseofalargenumberofdedicatedembeddedoperatingsystemiswidelyusedinthefullrangeofsingle-chipmicrocomputer.InPDAsandcellphonesasthecoreprocessingofhigh-endsingle-chiporevenadedicateddirectaccesstoWindowsandLinuxoperatingsystems.
Morethanadedicatedsingle-chipprocessorsuitableforembeddedsystems,soitwasuptotheapplication.Infactthenumberofsingle-chipistheworld'
slargestcomputer.Modernhumanlifeusedinalmosteverypieceofelectronicandmechanicalproductswillhaveasingle-chipintegration.Phone,telephone,calculator,homeappliances,electronictoys,handheldcomputersandcomputeraccessoriessuchasamouseintheDepartmentareequippedwith1-2singlechip.Andpersonalcomputersalsohavealargenumberofsingle-chipmicrocomputerintheworkplace.Vehiclesequippedwithmorethan40Departmentofthegeneralsingle-chip,complexindustrialcontrolsystemsandevensingle-chipmayhavehundredsofworkatthesametime!
SCMisnotonlyfarexceedsthenumberofPCandotherintegratedcomputing,even
morethanthenumberofhumanbeings.
Hardwaveintroduction
The8051familyofmicrocontrollersisbasedonanarchitecturewhichishighlyoptimizedforembeddedcontrolsystems.ItisusedinawidevarietyofapplicationsfrommilitaryequipmenttoautomobilestothekeyboardonyourPC.SecondonlytotheMotorola68HC11ineightbitprocessorssales,the8051familyofmicrocontrollersisavailableinawidearrayofvariationsfrommanufacturerssuchasIntel,Philips,andSiemens.Thesemanufacturershaveaddednumerousfeaturesandperipheralstothe8051suchasI2Cinterfaces,analogtodigitalconverters,watchdogtimers,andpulsewidthmodulatedoutputs.Variationsofthe8051withclockspeedsupto40MHzandvoltagerequirementsdownto1.5voltsareavailable.Thiswiderangeofpartsbasedononecoremakesthe8051familyanexcellentchoiceasthebasearchitectureforacompany'
sentirelineofproductssinceitcanperformmanyfunctionsanddeveloperswillonlyhavetolearnthisoneplatform.
Thebasicarchitectureconsistsofthefollowingfeatures:
?
aneightbitALU
32descreteI/Opins(4groupsof8)whichcanbeindividuallyaccessed
two16bittimer/counters
fullduplexUART
6interruptsourceswith2prioritylevels
128bytesofonboardRAM
separate64KbyteaddressspacesforDATAandCODEmemory
One8051processorcycleconsistsoftwelveoscillatorperiods.Eachofthetwelveoscillatorperiodsisusedforaspecialfunctionbythe8051coresuchasopcodefetchesandsamplesoftheinterruptdaisychainforpendinginterrupts.Thetimerequiredforany8051instructioncanbecomputedbydividingtheclockfrequencyby12,invertingthatresultandmultiplyingitbythenumberofprocessorcyclesrequiredbytheinstructioninquestion.Therefore,ifyouhaveasystemwhichisusingan11.059MHzclock,youcancomputethenumberofinstructionspersecondbydividingthisvalueby12.Thisgivesaninstructionfrequencyof921583instructionspersecond.Invertingthiswillprovidetheamountoftimetakenbyeachinstructioncycle(1.085microseconds).
二、ettingStartedwithµ
TheKeilSoftware8051developmenttoolslistedbelowareprogramsyouusetocompileyourCcode,assembleyourassemblysourcefiles,linkandlocateobjectmodulesandlibraries,createHEXfiles,anddebugyourtargetprogram.
µ
Vision2forWindows?
isanIntegratedDevelopmentEnvironmentthatcombinesprojectmanagement,sourcecodeediting,andprogramdebugginginonesingle,powerfulenvironment.
TheC51ANSIOptimizingCCrossCompilercreatesrelocatableobjectmodulesfromyourCsourcecode.
TheA51MacroAssemblercreatesrelocatableobjectmodulesfromyour8051assemblysourcecode.
TheBL51Linker/LocatorcombinesrelocatableobjectmodulescreatedbytheC51CompilerandtheA51Assemblerintoabsoluteobjectmodules.
TheLIB51LibraryManagercombinesobjectmodulesintolibrariesthatmaybeusedbythelinker.
TheOH51Object-HEXConvertercreatesIntelHEXfilesfromabsoluteobjectmodules.
TheRTX-51Real-timeOperatingSystemsimplifiesthedesignofcomplex,time-criticalsoftwareprojects.
SoftwareDevelopmentCycle
WhenyouusetheKeilSoftwaretools,theprojectdevelopmentcycleisroughlythesameasitisforanyothersoftwaredevelopmentproject.
1.Createaproject,selectthetargetchipfromthedevicedatabase,andconfigurethetoolsettings.
2.CreatesourcefilesinCorassembly.
3.Buildyourapplicationwiththeprojectmanager.
4.Correcterrorsinsourcefiles.
5.Testthelinkedapplication.
Vision2IDE
Theµ
Vision2IDEcombinesprojectmanagement,arich-featurededitorwithinteractiveerrorcorrection,optionsetup,makefacility,andon-linehelp.Useµ
Vision2tocreateyoursourcefilesandorganizethemintoaprojectthatdefinesyourtargetapplication.µ
Vision2automaticallycompiles,assembles,andlinksyourembeddedapplicationandprovidesasinglefocalpointforyourdevelopmentefforts.
LIB51LibraryManager
TheLIB51librarymanagerallowsyoutocreateobjectlibraryfromtheobjectfilescreatedbythecompilerandassembler.Librariesarespeciallyformatted,orderedprogramcollectionsofobjectmodulesthatmaybeusedbythelinkeratalatertime.Whenthelinkerprocessesalibrary,onlythoseobjectmodulesinthelibrarythatarenecessarytocreatetheprogramareused.
BL51Linker/Locator
TheBL51linkercreatesanabsoluteobjectmoduleusingtheobjectmodulesextractedfromlibrariesandthosecreatedbythecompilerandassembler.Anabsoluteobjectfileormodulecontainsnorelocatablecodeordata.Allcodeanddataresideatfixedmemorylocations.Theabsoluteobjectfilemaybeused:
ToprogramanEPROMorothermemorydevices,
Withtheµ
Vision2Debuggerforsimulationandtargetdebugging,
Withanin-circuitemulatorfortheprogramtesting.
Vision2Debugger
Vision2symbolic,source-leveldebuggerisideallysuitedforfast,reliableprogramdebugging.Thedebuggerincludesahigh-speedsimulatorthatletyousimulateanentire8051systemincludingon-chipperipheralsandexternalhardware.TheattributesofthechipyouuseareautomaticallyconfiguredwhenyouselectthedevicefromtheDeviceDatabase.
Vision2Debuggerprovidesseveralwaysforyoutotestyourprogramson
realtargethardware:
InstalltheMON51TargetMonitoronyourtargetsystemanddownloadyourprogramusingtheMonitor-51interfacebuilt-intotheµ
Vision2Debugger.,
UsetheAdvancedGDIinterfacetoattachusetheµ
Vision2Debuggerfrontendwithyourtargetsystem.
Monitor-51
Vision2DebuggersupportstargetdebuggingusingMonitor-51.Themonitorprogramresidesinthememoryofyourtargethardwareandcommunicateswiththeµ
Vision2Debuggerusingtheserialportofthe8051andaCOMportofyourPC.WithMonitor-51,µ
Vision2letsyouperformsource-level,symbolicdebuggingonyourtargethardware.
RTX51Real-TimeOperatingSystem
TheRTX51real-timeoperatingsystemisamultitaskingkernelforthe8051microcontrollerfamily.TheRTX51real-timekernelsimplifiesthesystemdesign,programming,anddebuggingofcomplexapplicationswherefastreactiontotimec