MSP430 单片机基础知识说明书
- 格式:pdf
- 大小:201.23 KB
- 文档页数:15
MSP430MicrocontrollerBasicsMSP430MicrocontrollerBasics
JohnH.Davies
AMSTERDAM•BOSTON•HEIDELBERG•LONDONNEWYORK•OXFORD•PARIS•SANDIEGOSANFRANCISCO•SINGAPORE•SYDNEY•TOKYO
NewnesisanimprintofElsevierNewnesisanimprintofElsevier30CorporateDrive,Suite400,Burlington,MA01803,USALinacreHouse,JordanHill,OxfordOX28DP,UK
Copyright©2008,ElsevierLtd.Allrightsreserved.
Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmittedinanyformorbyanymeans,electronic,mechanical,photocopying,recording,orotherwise,withoutthepriorwrittenpermissionofthepublisher.
PermissionsmaybesoughtdirectlyfromElsevier’sScience&TechnologyRightsDepartmentinOxford,UK:phone:(+44)1865843830,fax:(+44)1865853333,E-mail:************************.YoumayalsocompleteyourrequestonlineviatheElsevierhomepage(http://www.elsevier.com)byselecting“Support&Contact”then“CopyrightandPermission”andthen“ObtainingPermissions.”
Recognizingtheimportanceofpreservingwhathasbeenwritten,Elsevierprintsitsbooksonacid-freepaperwheneverpossible.
LibraryofCongressCataloging-in-PublicationDataApplicationsubmitted
BritishLibraryCataloguing-in-PublicationDataAcataloguerecordforthisbookisavailablefromtheBritishLibrary.
ISBN:978-0-7506-8276-3
ForinformationonallNewnespublications,visitourWebsiteat:http://www.books.elsevier.com
08091011121310987654321
PrintedintheUnitedStatesofAmerica“ToElizabeth.”Contents
Preface...........................................................................xi
Chapter1:EmbeddedElectronicSystemsandMicrocontrollers...................1
1.1What(andWhere)AreEmbeddedSystems?....................................1
1.2ApproachestoEmbeddedSystems...............................................2
1.3SmallMicrocontrollers...........................................................5
1.4AnatomyofaTypicalSmallMicrocontroller....................................8
1.5Memory...........................................................................11
1.6Software..........................................................................15
1.7WhereDoestheMSP430Fit?...................................................16
Chapter2:TheTexasInstrumentsMSP430.....................................21
2.1TheOutsideView—Pin-Out....................................................21
2.2TheInsideView—FunctionalBlockDiagram..................................24
2.3Memory...........................................................................25
2.4CentralProcessingUnit..........................................................30
2.5Memory-MappedInputandOutput.............................................32
2.6ClockGenerator..................................................................33
2.7Exceptions:InterruptsandResets...............................................36
2.8WheretoFindFurtherInformation.............................................37
Chapter3:Development.........................................................43
3.1DevelopmentEnvironment......................................................44
3.2TheCProgrammingLanguage..................................................46
3.3AssemblyLanguage..............................................................55
3.4AccesstotheMicrocontrollerforProgrammingandDebugging..............57
3.5DemonstrationBoards...........................................................59
3.6Hardware.........................................................................64
3.7Equipment........................................................................65viiiContents
Chapter4:ASimpleTouroftheMSP430.......................................67
4.1FirstProgramonaConventionalDesktopComputer..........................68
4.2LightLEDsinC.................................................................70
4.3LightLEDsinAssemblyLanguage.............................................72
4.4ReadInputfromaSwitch.......................................................80
4.5AutomaticControl:FlashingLightbySoftwareDelay........................91
4.6AutomaticControl:UseofSubroutines.........................................99
4.7AutomaticControl:FlashingLightbyPollingTimer_A......................105
4.8HeaderFilesandIssuesBrushedundertheCarpet............................114
Chapter5:ArchitectureoftheMSP430Processor.............................119
5.1CentralProcessingUnit.........................................................119
5.2AddressingModes..............................................................125
5.3ConstantGeneratorandEmulatedInstructions................................131
5.4InstructionSet...................................................................132
5.5Examples........................................................................146
5.6ReflectionsontheCPUandInstructionSet...................................153
5.7Resets............................................................................157
5.8ClockSystem....................................................................163